File tree 2 files changed +35
-0
lines changed
2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change
1
+ // test for ice #109178 cannot relate region: LUB(ReErased, ReError)
2
+
3
+ #![ allow( incomplete_features) ]
4
+ #![ crate_type = "lib" ]
5
+ #![ feature( adt_const_params, generic_const_exprs) ]
6
+
7
+ struct Changes < const CHANGES : & [ & ' static str ] >
8
+ //~^ ERROR `&` without an explicit lifetime name cannot be used here
9
+ where
10
+ [ ( ) ; CHANGES . len ( ) ] : , { }
11
+
12
+ impl < const CHANGES : & [ & str ] > Changes < CHANGES > where [ ( ) ; CHANGES . len ( ) ] : { }
13
+ //~^ ERROR `&` without an explicit lifetime name cannot be used here
14
+ //~^^ ERROR `&` without an explicit lifetime name cannot be used here
Original file line number Diff line number Diff line change
1
+ error[E0637]: `&` without an explicit lifetime name cannot be used here
2
+ --> $DIR/ice-cannot-relate-region-109178.rs:7:31
3
+ |
4
+ LL | struct Changes<const CHANGES: &[&'static str]>
5
+ | ^ explicit lifetime name needed here
6
+
7
+ error[E0637]: `&` without an explicit lifetime name cannot be used here
8
+ --> $DIR/ice-cannot-relate-region-109178.rs:12:21
9
+ |
10
+ LL | impl<const CHANGES: &[&str]> Changes<CHANGES> where [(); CHANGES.len()]: {}
11
+ | ^ explicit lifetime name needed here
12
+
13
+ error[E0637]: `&` without an explicit lifetime name cannot be used here
14
+ --> $DIR/ice-cannot-relate-region-109178.rs:12:23
15
+ |
16
+ LL | impl<const CHANGES: &[&str]> Changes<CHANGES> where [(); CHANGES.len()]: {}
17
+ | ^ explicit lifetime name needed here
18
+
19
+ error: aborting due to 3 previous errors
20
+
21
+ For more information about this error, try `rustc --explain E0637`.
You can’t perform that action at this time.
0 commit comments