Commit 723af43
committed
Add a rule that enum discriminants may not use generic parameters
This is implemented in the compiler with the diagnostic
[`ParamInEnumDiscriminant`](https://github.com/rust-lang/rust/blob/3b1b0ef4d80d3117924d91352c8b6ca528708b3c/compiler/rustc_resolve/src/errors.rs#L651-L661)
and
[`NoConstantGenericsReason::IsEnumDiscriminant`](https://github.com/rust-lang/rust/blob/3b1b0ef4d80d3117924d91352c8b6ca528708b3c/compiler/rustc_resolve/src/late.rs#L160-L168).1 parent 1d674cb commit 723af43
1 file changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
199 | 218 | | |
200 | 219 | | |
201 | 220 | | |
| |||
0 commit comments