]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/invalid-enum.stderr
Rollup merge of #75454 - ltratt:option_optimisation_guarantees, r=dtolnay
[rust.git] / src / test / ui / const-generics / invalid-enum.stderr
1 error[E0573]: expected type, found variant `CompileFlag::A`
2   --> $DIR/invalid-enum.rs:21:12
3    |
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    |                  ^                     ^
61
62 error[E0107]: wrong number of const arguments: expected 1, found 0
63   --> $DIR/invalid-enum.rs:21:3
64    |
65 LL |   test_1::<CompileFlag::A>();
66    |   ^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument
67
68 error[E0107]: wrong number of type arguments: expected 0, found 1
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
87    |
88 LL |   test_2::<_, CompileFlag::A>(0);
89    |               ^^^^^^^^^^^^^^ unexpected type argument
90    |
91 help: If this generic argument was intended as a const parameter, try surrounding it with braces:
92    |
93 LL |   test_2::<_, { CompileFlag::A }>(0);
94    |               ^                ^
95
96 error: aborting due to 11 previous errors
97
98 Some errors have detailed explanations: E0107, E0573.
99 For more information about an error, try `rustc --explain E0107`.