@@ -5,109 +5,29 @@ LL | struct A<const N: &u8>;
55   |                   ^ explicit lifetime name needed here
66
77error[E0637]: `&` without an explicit lifetime name cannot be used here
8-   --> $DIR/const-param-elided-lifetime.rs:14 :15
8+   --> $DIR/const-param-elided-lifetime.rs:13 :15
99   |
1010LL | impl<const N: &u8> A<N> {
1111   |               ^ explicit lifetime name needed here
1212
1313error[E0637]: `&` without an explicit lifetime name cannot be used here
14-   --> $DIR/const-param-elided-lifetime.rs:17 :21
14+   --> $DIR/const-param-elided-lifetime.rs:15 :21
1515   |
1616LL |     fn foo<const M: &u8>(&self) {}
1717   |                     ^ explicit lifetime name needed here
1818
1919error[E0637]: `&` without an explicit lifetime name cannot be used here
20-   --> $DIR/const-param-elided-lifetime.rs:22 :15
20+   --> $DIR/const-param-elided-lifetime.rs:19 :15
2121   |
2222LL | impl<const N: &u8> B for A<N> {}
2323   |               ^ explicit lifetime name needed here
2424
2525error[E0637]: `&` without an explicit lifetime name cannot be used here
26-   --> $DIR/const-param-elided-lifetime.rs:26 :17
26+   --> $DIR/const-param-elided-lifetime.rs:22 :17
2727   |
2828LL | fn bar<const N: &u8>() {}
2929   |                 ^ explicit lifetime name needed here
3030
31- error: `&u8` is forbidden as the type of a const generic parameter
32-   --> $DIR/const-param-elided-lifetime.rs:9:19
33-    |
34- LL | struct A<const N: &u8>;
35-    |                   ^^^
36-    |
37-    = note: the only supported types are integers, `bool` and `char`
38- help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
39-    |
40- LL + #![feature(adt_const_params)]
41-    |
42- help: add `#![feature(unsized_const_params)]` to the crate attributes to enable references to implement the `ConstParamTy` trait
43-    |
44- LL + #![feature(unsized_const_params)]
45-    |
46- 
47- error: `&u8` is forbidden as the type of a const generic parameter
48-   --> $DIR/const-param-elided-lifetime.rs:14:15
49-    |
50- LL | impl<const N: &u8> A<N> {
51-    |               ^^^
52-    |
53-    = note: the only supported types are integers, `bool` and `char`
54- help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
55-    |
56- LL + #![feature(adt_const_params)]
57-    |
58- help: add `#![feature(unsized_const_params)]` to the crate attributes to enable references to implement the `ConstParamTy` trait
59-    |
60- LL + #![feature(unsized_const_params)]
61-    |
62- 
63- error: `&u8` is forbidden as the type of a const generic parameter
64-   --> $DIR/const-param-elided-lifetime.rs:22:15
65-    |
66- LL | impl<const N: &u8> B for A<N> {}
67-    |               ^^^
68-    |
69-    = note: the only supported types are integers, `bool` and `char`
70- help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
71-    |
72- LL + #![feature(adt_const_params)]
73-    |
74- help: add `#![feature(unsized_const_params)]` to the crate attributes to enable references to implement the `ConstParamTy` trait
75-    |
76- LL + #![feature(unsized_const_params)]
77-    |
78- 
79- error: `&u8` is forbidden as the type of a const generic parameter
80-   --> $DIR/const-param-elided-lifetime.rs:26:17
81-    |
82- LL | fn bar<const N: &u8>() {}
83-    |                 ^^^
84-    |
85-    = note: the only supported types are integers, `bool` and `char`
86- help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
87-    |
88- LL + #![feature(adt_const_params)]
89-    |
90- help: add `#![feature(unsized_const_params)]` to the crate attributes to enable references to implement the `ConstParamTy` trait
91-    |
92- LL + #![feature(unsized_const_params)]
93-    |
94- 
95- error: `&u8` is forbidden as the type of a const generic parameter
96-   --> $DIR/const-param-elided-lifetime.rs:17:21
97-    |
98- LL |     fn foo<const M: &u8>(&self) {}
99-    |                     ^^^
100-    |
101-    = note: the only supported types are integers, `bool` and `char`
102- help: add `#![feature(adt_const_params)]` to the crate attributes to enable more complex and user defined types
103-    |
104- LL + #![feature(adt_const_params)]
105-    |
106- help: add `#![feature(unsized_const_params)]` to the crate attributes to enable references to implement the `ConstParamTy` trait
107-    |
108- LL + #![feature(unsized_const_params)]
109-    |
110- 
111- error: aborting due to 10 previous errors
31+ error: aborting due to 5 previous errors
11232
11333For more information about this error, try `rustc --explain E0637`.
0 commit comments