Skip to content

Commit e647543

Browse files
authored
Rollup merge of #122844 - matthiaskrgr:just_one_more_test_mom, r=compiler-errors
add test for ice "cannot relate region: LUB(ReErased, ReError)" Fixes #109178
2 parents b469a6d + 847311e commit e647543

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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 numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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`.

0 commit comments

Comments
 (0)