@@ -5,6 +5,7 @@ LL | let _: [u8; foo::<T>()];
5
5
| ^ cannot perform const operation using `T`
6
6
|
7
7
= note: type parameters may not be used in const expressions
8
+ = note: use #![feature(const_generics)] and #![feature(const_evaluatable_checked)] to allow generic const expressions
8
9
9
10
error: generic parameters may not be used in const operations
10
11
--> $DIR/const-arg-in-const-arg.rs:15:23
@@ -13,7 +14,7 @@ LL | let _: [u8; bar::<N>()];
13
14
| ^ cannot perform const operation using `N`
14
15
|
15
16
= help: const parameters may only be used as standalone arguments, i.e. `N`
16
- = note: use feature(const_generics) and feature(const_evaluatable_checked) to enable this
17
+ = note: use #![ feature(const_generics)] and #![ feature(const_evaluatable_checked)] to allow generic const expressions
17
18
18
19
error: generic parameters may not be used in const operations
19
20
--> $DIR/const-arg-in-const-arg.rs:25:23
@@ -22,7 +23,7 @@ LL | let _ = [0; bar::<N>()];
22
23
| ^ cannot perform const operation using `N`
23
24
|
24
25
= help: const parameters may only be used as standalone arguments, i.e. `N`
25
- = note: use feature(const_generics) and feature(const_evaluatable_checked) to enable this
26
+ = note: use #![ feature(const_generics)] and #![ feature(const_evaluatable_checked)] to allow generic const expressions
26
27
27
28
error: generic parameters may not be used in const operations
28
29
--> $DIR/const-arg-in-const-arg.rs:30:24
@@ -31,6 +32,7 @@ LL | let _: Foo<{ foo::<T>() }>;
31
32
| ^ cannot perform const operation using `T`
32
33
|
33
34
= note: type parameters may not be used in const expressions
35
+ = note: use #![feature(const_generics)] and #![feature(const_evaluatable_checked)] to allow generic const expressions
34
36
35
37
error: generic parameters may not be used in const operations
36
38
--> $DIR/const-arg-in-const-arg.rs:31:24
@@ -39,7 +41,7 @@ LL | let _: Foo<{ bar::<N>() }>;
39
41
| ^ cannot perform const operation using `N`
40
42
|
41
43
= help: const parameters may only be used as standalone arguments, i.e. `N`
42
- = note: use feature(const_generics) and feature(const_evaluatable_checked) to enable this
44
+ = note: use #![ feature(const_generics)] and #![ feature(const_evaluatable_checked)] to allow generic const expressions
43
45
44
46
error: generic parameters may not be used in const operations
45
47
--> $DIR/const-arg-in-const-arg.rs:36:27
@@ -48,6 +50,7 @@ LL | let _ = Foo::<{ foo::<T>() }>;
48
50
| ^ cannot perform const operation using `T`
49
51
|
50
52
= note: type parameters may not be used in const expressions
53
+ = note: use #![feature(const_generics)] and #![feature(const_evaluatable_checked)] to allow generic const expressions
51
54
52
55
error: generic parameters may not be used in const operations
53
56
--> $DIR/const-arg-in-const-arg.rs:37:27
@@ -56,7 +59,7 @@ LL | let _ = Foo::<{ bar::<N>() }>;
56
59
| ^ cannot perform const operation using `N`
57
60
|
58
61
= help: const parameters may only be used as standalone arguments, i.e. `N`
59
- = note: use feature(const_generics) and feature(const_evaluatable_checked) to enable this
62
+ = note: use #![ feature(const_generics)] and #![ feature(const_evaluatable_checked)] to allow generic const expressions
60
63
61
64
error[E0658]: a non-static lifetime is not allowed in a `const`
62
65
--> $DIR/const-arg-in-const-arg.rs:16:23
0 commit comments