blob: 24668b08b8a568c611a1b88d654c6e3e49767e39 (
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
|
error: invalid const generic expression
--> $DIR/bad-const-generic-exprs.rs:4:16
|
LL | let _: Wow<if true {}>;
| ^^^^^^^^^^
|
help: expressions must be enclosed in braces to be used as const generic arguments
|
LL | let _: Wow<{ if true {} }>;
| + +
error: invalid const generic expression
--> $DIR/bad-const-generic-exprs.rs:7:16
|
LL | let _: Wow<|| ()>;
| ^^^^^
|
help: expressions must be enclosed in braces to be used as const generic arguments
|
LL | let _: Wow<{ || () }>;
| + +
error: expected one of `,` or `>`, found `.`
--> $DIR/bad-const-generic-exprs.rs:10:17
|
LL | let _: Wow<A.b>;
| ^ expected one of `,` or `>`
|
help: expressions must be enclosed in braces to be used as const generic arguments
|
LL | let _: Wow<{ A.b }>;
| + +
error: expected one of `,` or `>`, found `.`
--> $DIR/bad-const-generic-exprs.rs:13:17
|
LL | let _: Wow<A.0>;
| ^ expected one of `,` or `>`
|
help: expressions must be enclosed in braces to be used as const generic arguments
|
LL | let _: Wow<{ A.0 }>;
| + +
error: expected type, found `12`
--> $DIR/bad-const-generic-exprs.rs:19:17
|
LL | let _: Wow<[12]>;
| ^^ expected type
error[E0747]: type provided when a constant was expected
--> $DIR/bad-const-generic-exprs.rs:19:16
|
LL | let _: Wow<[12]>;
| ^^^^
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0747`.
|