1 error[E0637]: `&` without an explicit lifetime name cannot be used here
2 --> $DIR/const-param-elided-lifetime.rs:11:19
4 LL | struct A<const N: &u8>;
5 | ^ explicit lifetime name needed here
7 error[E0637]: `&` without an explicit lifetime name cannot be used here
8 --> $DIR/const-param-elided-lifetime.rs:16:15
10 LL | impl<const N: &u8> A<N> {
11 | ^ explicit lifetime name needed here
13 error[E0637]: `&` without an explicit lifetime name cannot be used here
14 --> $DIR/const-param-elided-lifetime.rs:19:21
16 LL | fn foo<const M: &u8>(&self) {}
17 | ^ explicit lifetime name needed here
19 error[E0637]: `&` without an explicit lifetime name cannot be used here
20 --> $DIR/const-param-elided-lifetime.rs:24:15
22 LL | impl<const N: &u8> B for A<N> {}
23 | ^ explicit lifetime name needed here
25 error[E0637]: `&` without an explicit lifetime name cannot be used here
26 --> $DIR/const-param-elided-lifetime.rs:28:17
28 LL | fn bar<const N: &u8>() {}
29 | ^ explicit lifetime name needed here
31 error: using `&'static u8` as const generic parameters is forbidden
32 --> $DIR/const-param-elided-lifetime.rs:11:19
34 LL | struct A<const N: &u8>;
37 = note: the only supported types are integers, `bool` and `char`
38 = note: more complex types are supported with `#[feature(const_generics)]`
40 error: using `&'static u8` as const generic parameters is forbidden
41 --> $DIR/const-param-elided-lifetime.rs:16:15
43 LL | impl<const N: &u8> A<N> {
46 = note: the only supported types are integers, `bool` and `char`
47 = note: more complex types are supported with `#[feature(const_generics)]`
49 error: using `&'static u8` as const generic parameters is forbidden
50 --> $DIR/const-param-elided-lifetime.rs:24:15
52 LL | impl<const N: &u8> B for A<N> {}
55 = note: the only supported types are integers, `bool` and `char`
56 = note: more complex types are supported with `#[feature(const_generics)]`
58 error: using `&'static u8` as const generic parameters is forbidden
59 --> $DIR/const-param-elided-lifetime.rs:28:17
61 LL | fn bar<const N: &u8>() {}
64 = note: the only supported types are integers, `bool` and `char`
65 = note: more complex types are supported with `#[feature(const_generics)]`
67 error: using `&'static u8` as const generic parameters is forbidden
68 --> $DIR/const-param-elided-lifetime.rs:19:21
70 LL | fn foo<const M: &u8>(&self) {}
73 = note: the only supported types are integers, `bool` and `char`
74 = note: more complex types are supported with `#[feature(const_generics)]`
76 error: aborting due to 10 previous errors
78 For more information about this error, try `rustc --explain E0637`.