@@ -28,7 +28,7 @@ error[E0637]: `&` without an explicit lifetime name cannot be used here
28
28
LL | fn bar<const N: &u8>() {}
29
29
| ^ explicit lifetime name needed here
30
30
31
- error: using `&'static u8` as const generic parameters is forbidden
31
+ error: `&'static u8` is forbidden as the type of a const generic parameter
32
32
--> $DIR/const-param-elided-lifetime.rs:11:19
33
33
|
34
34
LL | struct A<const N: &u8>;
@@ -37,7 +37,7 @@ LL | struct A<const N: &u8>;
37
37
= note: the only supported types are integers, `bool` and `char`
38
38
= note: more complex types are supported with `#[feature(const_generics)]`
39
39
40
- error: using `&'static u8` as const generic parameters is forbidden
40
+ error: `&'static u8` is forbidden as the type of a const generic parameter
41
41
--> $DIR/const-param-elided-lifetime.rs:16:15
42
42
|
43
43
LL | impl<const N: &u8> A<N> {
@@ -46,7 +46,7 @@ LL | impl<const N: &u8> A<N> {
46
46
= note: the only supported types are integers, `bool` and `char`
47
47
= note: more complex types are supported with `#[feature(const_generics)]`
48
48
49
- error: using `&'static u8` as const generic parameters is forbidden
49
+ error: `&'static u8` is forbidden as the type of a const generic parameter
50
50
--> $DIR/const-param-elided-lifetime.rs:24:15
51
51
|
52
52
LL | impl<const N: &u8> B for A<N> {}
@@ -55,7 +55,7 @@ LL | impl<const N: &u8> B for A<N> {}
55
55
= note: the only supported types are integers, `bool` and `char`
56
56
= note: more complex types are supported with `#[feature(const_generics)]`
57
57
58
- error: using `&'static u8` as const generic parameters is forbidden
58
+ error: `&'static u8` is forbidden as the type of a const generic parameter
59
59
--> $DIR/const-param-elided-lifetime.rs:28:17
60
60
|
61
61
LL | fn bar<const N: &u8>() {}
@@ -64,7 +64,7 @@ LL | fn bar<const N: &u8>() {}
64
64
= note: the only supported types are integers, `bool` and `char`
65
65
= note: more complex types are supported with `#[feature(const_generics)]`
66
66
67
- error: using `&'static u8` as const generic parameters is forbidden
67
+ error: `&'static u8` is forbidden as the type of a const generic parameter
68
68
--> $DIR/const-param-elided-lifetime.rs:19:21
69
69
|
70
70
LL | fn foo<const M: &u8>(&self) {}
0 commit comments