2020-08-22 03:32:07 +00:00
|
|
|
error[E0573]: expected type, found variant `CompileFlag::A`
|
2020-08-31 17:12:53 +00:00
|
|
|
--> $DIR/invalid-enum.rs:21:12
|
2020-08-22 03:32:07 +00:00
|
|
|
|
|
2020-08-31 17:12:53 +00:00
|
|
|
LL | test_1::<CompileFlag::A>();
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| not a type
|
|
|
|
| help: try using the variant's enum: `CompileFlag`
|
|
|
|
|
|
|
|
error[E0573]: expected type, found variant `CompileFlag::A`
|
|
|
|
--> $DIR/invalid-enum.rs:26:15
|
|
|
|
|
|
|
|
|
LL | test_2::<_, CompileFlag::A>(0);
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| not a type
|
|
|
|
| help: try using the variant's enum: `CompileFlag`
|
|
|
|
|
|
|
|
error[E0573]: expected type, found variant `CompileFlag::A`
|
|
|
|
--> $DIR/invalid-enum.rs:31:18
|
|
|
|
|
|
|
|
|
LL | let _: Example<CompileFlag::A, _> = Example { x: 0 };
|
|
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| not a type
|
|
|
|
| help: try using the variant's enum: `CompileFlag`
|
|
|
|
|
|
|
|
error[E0107]: wrong number of const arguments: expected 1, found 0
|
|
|
|
--> $DIR/invalid-enum.rs:31:10
|
|
|
|
|
|
|
|
|
LL | let _: Example<CompileFlag::A, _> = Example { x: 0 };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument
|
|
|
|
|
|
|
|
error[E0107]: wrong number of type arguments: expected at most 1, found 2
|
2020-11-13 19:12:49 +01:00
|
|
|
--> $DIR/invalid-enum.rs:31:34
|
2020-08-31 17:12:53 +00:00
|
|
|
|
|
|
|
|
LL | let _: Example<CompileFlag::A, _> = Example { x: 0 };
|
2020-11-13 19:12:49 +01:00
|
|
|
| ^ unexpected type argument
|
2020-08-31 17:12:53 +00:00
|
|
|
|
|
|
|
|
help: If this generic argument was intended as a const parameter, try surrounding it with braces:
|
|
|
|
|
|
|
|
|
LL | let _: Example<{ CompileFlag::A }, _> = Example { x: 0 };
|
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
error[E0107]: wrong number of const arguments: expected 1, found 0
|
|
|
|
--> $DIR/invalid-enum.rs:36:10
|
|
|
|
|
|
|
|
|
LL | let _: Example<Example::ASSOC_FLAG, _> = Example { x: 0 };
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument
|
|
|
|
|
|
|
|
error[E0107]: wrong number of type arguments: expected at most 1, found 2
|
2020-11-13 19:12:49 +01:00
|
|
|
--> $DIR/invalid-enum.rs:36:39
|
2020-08-31 17:12:53 +00:00
|
|
|
|
|
|
|
|
LL | let _: Example<Example::ASSOC_FLAG, _> = Example { x: 0 };
|
2020-11-13 19:12:49 +01:00
|
|
|
| ^ unexpected type argument
|
2020-08-31 17:12:53 +00:00
|
|
|
|
|
|
|
|
help: If this generic argument was intended as a const parameter, try surrounding it with braces:
|
|
|
|
|
|
|
|
|
LL | let _: Example<{ Example::ASSOC_FLAG }, _> = Example { x: 0 };
|
|
|
|
| ^ ^
|
2020-08-22 03:32:07 +00:00
|
|
|
|
|
|
|
error[E0107]: wrong number of const arguments: expected 1, found 0
|
2020-08-31 17:12:53 +00:00
|
|
|
--> $DIR/invalid-enum.rs:21:3
|
2020-08-22 03:32:07 +00:00
|
|
|
|
|
2020-08-31 17:12:53 +00:00
|
|
|
LL | test_1::<CompileFlag::A>();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument
|
2020-08-22 03:32:07 +00:00
|
|
|
|
|
|
|
error[E0107]: wrong number of type arguments: expected 0, found 1
|
2020-08-31 17:12:53 +00:00
|
|
|
--> $DIR/invalid-enum.rs:21:12
|
|
|
|
|
|
|
|
|
LL | test_1::<CompileFlag::A>();
|
|
|
|
| ^^^^^^^^^^^^^^ unexpected type argument
|
|
|
|
|
|
|
|
|
help: If this generic argument was intended as a const parameter, try surrounding it with braces:
|
|
|
|
|
|
|
|
|
LL | test_1::<{ CompileFlag::A }>();
|
|
|
|
| ^ ^
|
|
|
|
|
|
|
|
error[E0107]: wrong number of const arguments: expected 1, found 0
|
|
|
|
--> $DIR/invalid-enum.rs:26:3
|
|
|
|
|
|
|
|
|
LL | test_2::<_, CompileFlag::A>(0);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument
|
|
|
|
|
|
|
|
error[E0107]: wrong number of type arguments: expected 1, found 2
|
|
|
|
--> $DIR/invalid-enum.rs:26:15
|
2020-08-22 03:32:07 +00:00
|
|
|
|
|
2020-08-31 17:12:53 +00:00
|
|
|
LL | test_2::<_, CompileFlag::A>(0);
|
|
|
|
| ^^^^^^^^^^^^^^ unexpected type argument
|
2020-08-22 03:32:07 +00:00
|
|
|
|
|
2020-08-21 06:55:14 +00:00
|
|
|
help: If this generic argument was intended as a const parameter, try surrounding it with braces:
|
|
|
|
|
|
2020-08-31 17:12:53 +00:00
|
|
|
LL | test_2::<_, { CompileFlag::A }>(0);
|
|
|
|
| ^ ^
|
2020-08-22 03:32:07 +00:00
|
|
|
|
2020-08-31 17:12:53 +00:00
|
|
|
error: aborting due to 11 previous errors
|
2020-08-22 03:32:07 +00:00
|
|
|
|
|
|
|
Some errors have detailed explanations: E0107, E0573.
|
|
|
|
For more information about an error, try `rustc --explain E0107`.
|