forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#122844 - matthiaskrgr:just_one_more_test_mom, r=compiler-errors add test for ice "cannot relate region: LUB(ReErased, ReError)" Fixes rust-lang#109178
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// test for ice #109178 cannot relate region: LUB(ReErased, ReError) | ||
|
||
#![allow(incomplete_features)] | ||
#![crate_type = "lib"] | ||
#![feature(adt_const_params, generic_const_exprs)] | ||
|
||
struct Changes<const CHANGES: &[&'static str]> | ||
//~^ ERROR `&` without an explicit lifetime name cannot be used here | ||
where | ||
[(); CHANGES.len()]:, {} | ||
|
||
impl<const CHANGES: &[&str]> Changes<CHANGES> where [(); CHANGES.len()]: {} | ||
//~^ ERROR `&` without an explicit lifetime name cannot be used here | ||
//~^^ ERROR `&` without an explicit lifetime name cannot be used here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
error[E0637]: `&` without an explicit lifetime name cannot be used here | ||
--> $DIR/ice-cannot-relate-region-109178.rs:7:31 | ||
| | ||
LL | struct Changes<const CHANGES: &[&'static str]> | ||
| ^ explicit lifetime name needed here | ||
|
||
error[E0637]: `&` without an explicit lifetime name cannot be used here | ||
--> $DIR/ice-cannot-relate-region-109178.rs:12:21 | ||
| | ||
LL | impl<const CHANGES: &[&str]> Changes<CHANGES> where [(); CHANGES.len()]: {} | ||
| ^ explicit lifetime name needed here | ||
|
||
error[E0637]: `&` without an explicit lifetime name cannot be used here | ||
--> $DIR/ice-cannot-relate-region-109178.rs:12:23 | ||
| | ||
LL | impl<const CHANGES: &[&str]> Changes<CHANGES> where [(); CHANGES.len()]: {} | ||
| ^ explicit lifetime name needed here | ||
|
||
error: aborting due to 3 previous errors | ||
|
||
For more information about this error, try `rustc --explain E0637`. |