]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/invalid-enum.stderr
Auto merge of #79342 - CDirkx:ipaddr-const, r=oli-obk
[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:25: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:29: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[E0747]: type provided when a constant was expected
29   --> $DIR/invalid-enum.rs:29:18
30    |
31 LL |   let _: Example<CompileFlag::A, _> = Example { x: 0 };
32    |                  ^^^^^^^^^^^^^^
33    |
34 help: if this generic argument was intended as a const parameter, try surrounding it with braces:
35    |
36 LL |   let _: Example<{ CompileFlag::A }, _> = Example { x: 0 };
37    |                  ^                ^
38
39 error[E0747]: type provided when a constant was expected
40   --> $DIR/invalid-enum.rs:33:18
41    |
42 LL |   let _: Example<Example::ASSOC_FLAG, _> = Example { x: 0 };
43    |                  ^^^^^^^^^^^^^^^^^^^
44    |
45 help: if this generic argument was intended as a const parameter, try surrounding it with braces:
46    |
47 LL |   let _: Example<{ Example::ASSOC_FLAG }, _> = Example { x: 0 };
48    |                  ^                     ^
49
50 error[E0747]: type provided when a constant was expected
51   --> $DIR/invalid-enum.rs:21:12
52    |
53 LL |   test_1::<CompileFlag::A>();
54    |            ^^^^^^^^^^^^^^
55    |
56 help: if this generic argument was intended as a const parameter, try surrounding it with braces:
57    |
58 LL |   test_1::<{ CompileFlag::A }>();
59    |            ^                ^
60
61 error[E0747]: type provided when a constant was expected
62   --> $DIR/invalid-enum.rs:25:15
63    |
64 LL |   test_2::<_, CompileFlag::A>(0);
65    |               ^^^^^^^^^^^^^^
66    |
67 help: if this generic argument was intended as a const parameter, try surrounding it with braces:
68    |
69 LL |   test_2::<_, { CompileFlag::A }>(0);
70    |               ^                ^
71
72 error: aborting due to 7 previous errors
73
74 Some errors have detailed explanations: E0573, E0747.
75 For more information about an error, try `rustc --explain E0573`.