1 error[E0573]: expected type, found variant `CompileFlag::A`
2 --> $DIR/invalid-enum.rs:21:12
4 LL | test_1::<CompileFlag::A>();
8 | help: try using the variant's enum: `CompileFlag`
10 error[E0573]: expected type, found variant `CompileFlag::A`
11 --> $DIR/invalid-enum.rs:26:15
13 LL | test_2::<_, CompileFlag::A>(0);
17 | help: try using the variant's enum: `CompileFlag`
19 error[E0573]: expected type, found variant `CompileFlag::A`
20 --> $DIR/invalid-enum.rs:31:18
22 LL | let _: Example<CompileFlag::A, _> = Example { x: 0 };
26 | help: try using the variant's enum: `CompileFlag`
28 error[E0107]: wrong number of const arguments: expected 1, found 0
29 --> $DIR/invalid-enum.rs:31:10
31 LL | let _: Example<CompileFlag::A, _> = Example { x: 0 };
32 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument
34 error[E0107]: wrong number of type arguments: expected at most 1, found 2
35 --> $DIR/invalid-enum.rs:31:10
37 LL | let _: Example<CompileFlag::A, _> = Example { x: 0 };
38 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected at most 1 type argument
40 help: If this generic argument was intended as a const parameter, try surrounding it with braces:
42 LL | let _: Example<{ CompileFlag::A }, _> = Example { x: 0 };
45 error[E0107]: wrong number of const arguments: expected 1, found 0
46 --> $DIR/invalid-enum.rs:36:10
48 LL | let _: Example<Example::ASSOC_FLAG, _> = Example { x: 0 };
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument
51 error[E0107]: wrong number of type arguments: expected at most 1, found 2
52 --> $DIR/invalid-enum.rs:36:10
54 LL | let _: Example<Example::ASSOC_FLAG, _> = Example { x: 0 };
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected at most 1 type argument
57 help: If this generic argument was intended as a const parameter, try surrounding it with braces:
59 LL | let _: Example<{ Example::ASSOC_FLAG }, _> = Example { x: 0 };
62 error[E0107]: wrong number of const arguments: expected 1, found 0
63 --> $DIR/invalid-enum.rs:21:3
65 LL | test_1::<CompileFlag::A>();
66 | ^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument
68 error[E0107]: wrong number of type arguments: expected 0, found 1
69 --> $DIR/invalid-enum.rs:21:12
71 LL | test_1::<CompileFlag::A>();
72 | ^^^^^^^^^^^^^^ unexpected type argument
74 help: If this generic argument was intended as a const parameter, try surrounding it with braces:
76 LL | test_1::<{ CompileFlag::A }>();
79 error[E0107]: wrong number of const arguments: expected 1, found 0
80 --> $DIR/invalid-enum.rs:26:3
82 LL | test_2::<_, CompileFlag::A>(0);
83 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument
85 error[E0107]: wrong number of type arguments: expected 1, found 2
86 --> $DIR/invalid-enum.rs:26:15
88 LL | test_2::<_, CompileFlag::A>(0);
89 | ^^^^^^^^^^^^^^ unexpected type argument
91 help: If this generic argument was intended as a const parameter, try surrounding it with braces:
93 LL | test_2::<_, { CompileFlag::A }>(0);
96 error: aborting due to 11 previous errors
98 Some errors have detailed explanations: E0107, E0573.
99 For more information about an error, try `rustc --explain E0107`.