summary refs log tree commit diff
path: root/src/test/ui/const-generics/invalid-enum.stderr
blob: 965abbc9cb7b896acdc8c828d537cbb6e929d48b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
error[E0573]: expected type, found variant `CompileFlag::A`
  --> $DIR/invalid-enum.rs:21:12
   |
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
  --> $DIR/invalid-enum.rs:31:10
   |
LL |   let _: Example<CompileFlag::A, _> = Example { x: 0 };
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected at most 1 type argument
   |
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
  --> $DIR/invalid-enum.rs:36:10
   |
LL |   let _: Example<Example::ASSOC_FLAG, _> = Example { x: 0 };
   |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected at most 1 type argument
   |
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 };
   |                  ^                     ^

error[E0107]: wrong number of const arguments: expected 1, found 0
  --> $DIR/invalid-enum.rs:21:3
   |
LL |   test_1::<CompileFlag::A>();
   |   ^^^^^^^^^^^^^^^^^^^^^^^^ expected 1 const argument

error[E0107]: wrong number of type arguments: expected 0, found 1
  --> $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
   |
LL |   test_2::<_, CompileFlag::A>(0);
   |               ^^^^^^^^^^^^^^ unexpected type argument
   |
help: If this generic argument was intended as a const parameter, try surrounding it with braces:
   |
LL |   test_2::<_, { CompileFlag::A }>(0);
   |               ^                ^

error: aborting due to 11 previous errors

Some errors have detailed explanations: E0107, E0573.
For more information about an error, try `rustc --explain E0107`.