|
1 | 1 | error[E0573]: expected type, found variant `CompileFlag::A`
|
2 |
| - --> $DIR/invalid-enum.rs:13:10 |
| 2 | + --> $DIR/invalid-enum.rs:21:12 |
3 | 3 | |
|
4 |
| -LL | test::<CompileFlag::A>(); |
5 |
| - | ^^^^^^^^^^^^^^ |
6 |
| - | | |
7 |
| - | not a type |
8 |
| - | help: try using the variant's enum: `CompileFlag` |
| 4 | +LL | test_1::<CompileFlag::A>(); |
| 5 | + | ^^^^^^^^^^^^^^ |
| 6 | + | | |
| 7 | + | not a type |
| 8 | + | help: try using the variant's enum: `CompileFlag` |
| 9 | + |
| 10 | +error[E0573]: expected type, found variant `CompileFlag::A` |
| 11 | + --> $DIR/invalid-enum.rs:26:15 |
| 12 | + | |
| 13 | +LL | test_2::<_, CompileFlag::A>(0); |
| 14 | + | ^^^^^^^^^^^^^^ |
| 15 | + | | |
| 16 | + | not a type |
| 17 | + | help: try using the variant's enum: `CompileFlag` |
| 18 | + |
| 19 | +error[E0573]: expected type, found variant `CompileFlag::A` |
| 20 | + --> $DIR/invalid-enum.rs:31:18 |
| 21 | + | |
| 22 | +LL | let _: Example<CompileFlag::A, _> = Example { x: 0 }; |
| 23 | + | ^^^^^^^^^^^^^^ |
| 24 | + | | |
| 25 | + | not a type |
| 26 | + | help: try using the variant's enum: `CompileFlag` |
| 27 | + |
| 28 | +error[E0107]: wrong number of const arguments: expected 1, found 0 |
| 29 | + --> $DIR/invalid-enum.rs:31:10 |
| 30 | + | |
| 31 | +LL | let _: Example<CompileFlag::A, _> = Example { x: 0 }; |
| 32 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument |
| 33 | + |
| 34 | +error[E0107]: wrong number of type arguments: expected at most 1, found 2 |
| 35 | + --> $DIR/invalid-enum.rs:31:10 |
| 36 | + | |
| 37 | +LL | let _: Example<CompileFlag::A, _> = Example { x: 0 }; |
| 38 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected at most 1 type argument |
| 39 | + | |
| 40 | +help: If this generic argument was intended as a const parameter, try surrounding it with braces: |
| 41 | + | |
| 42 | +LL | let _: Example<{ CompileFlag::A }, _> = Example { x: 0 }; |
| 43 | + | ^ ^ |
| 44 | + |
| 45 | +error[E0107]: wrong number of const arguments: expected 1, found 0 |
| 46 | + --> $DIR/invalid-enum.rs:36:10 |
| 47 | + | |
| 48 | +LL | let _: Example<Example::ASSOC_FLAG, _> = Example { x: 0 }; |
| 49 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument |
| 50 | + |
| 51 | +error[E0107]: wrong number of type arguments: expected at most 1, found 2 |
| 52 | + --> $DIR/invalid-enum.rs:36:10 |
| 53 | + | |
| 54 | +LL | let _: Example<Example::ASSOC_FLAG, _> = Example { x: 0 }; |
| 55 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected at most 1 type argument |
| 56 | + | |
| 57 | +help: If this generic argument was intended as a const parameter, try surrounding it with braces: |
| 58 | + | |
| 59 | +LL | let _: Example<{ Example::ASSOC_FLAG }, _> = Example { x: 0 }; |
| 60 | + | ^ ^ |
9 | 61 |
|
10 | 62 | error[E0107]: wrong number of const arguments: expected 1, found 0
|
11 |
| - --> $DIR/invalid-enum.rs:13:3 |
| 63 | + --> $DIR/invalid-enum.rs:21:3 |
12 | 64 | |
|
13 |
| -LL | test::<CompileFlag::A>(); |
14 |
| - | ^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument |
| 65 | +LL | test_1::<CompileFlag::A>(); |
| 66 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument |
15 | 67 |
|
16 | 68 | error[E0107]: wrong number of type arguments: expected 0, found 1
|
17 |
| - --> $DIR/invalid-enum.rs:13:10 |
| 69 | + --> $DIR/invalid-enum.rs:21:12 |
| 70 | + | |
| 71 | +LL | test_1::<CompileFlag::A>(); |
| 72 | + | ^^^^^^^^^^^^^^ unexpected type argument |
| 73 | + | |
| 74 | +help: If this generic argument was intended as a const parameter, try surrounding it with braces: |
| 75 | + | |
| 76 | +LL | test_1::<{ CompileFlag::A }>(); |
| 77 | + | ^ ^ |
| 78 | + |
| 79 | +error[E0107]: wrong number of const arguments: expected 1, found 0 |
| 80 | + --> $DIR/invalid-enum.rs:26:3 |
| 81 | + | |
| 82 | +LL | test_2::<_, CompileFlag::A>(0); |
| 83 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument |
| 84 | + |
| 85 | +error[E0107]: wrong number of type arguments: expected 1, found 2 |
| 86 | + --> $DIR/invalid-enum.rs:26:15 |
18 | 87 | |
|
19 |
| -LL | test::<CompileFlag::A>(); |
20 |
| - | ^^^^^^^^^^^^^^ unexpected type argument |
| 88 | +LL | test_2::<_, CompileFlag::A>(0); |
| 89 | + | ^^^^^^^^^^^^^^ unexpected type argument |
21 | 90 | |
|
22 | 91 | help: If this generic argument was intended as a const parameter, try surrounding it with braces:
|
23 | 92 | |
|
24 |
| -LL | test::<{ CompileFlag::A }>(); |
25 |
| - | ^ ^ |
| 93 | +LL | test_2::<_, { CompileFlag::A }>(0); |
| 94 | + | ^ ^ |
26 | 95 |
|
27 |
| -error: aborting due to 3 previous errors |
| 96 | +error: aborting due to 11 previous errors |
28 | 97 |
|
29 | 98 | Some errors have detailed explanations: E0107, E0573.
|
30 | 99 | For more information about an error, try `rustc --explain E0107`.
|
0 commit comments