add test for ice "cannot relate region: LUB(ReErased, ReError)"
Fixes #109178
This commit is contained in:
parent
a0569fa8f9
commit
847311e36f
14
tests/ui/inference/ice-cannot-relate-region-109178.rs
Normal file
14
tests/ui/inference/ice-cannot-relate-region-109178.rs
Normal file
@ -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
|
21
tests/ui/inference/ice-cannot-relate-region-109178.stderr
Normal file
21
tests/ui/inference/ice-cannot-relate-region-109178.stderr
Normal file
@ -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`.
|
Loading…
Reference in New Issue
Block a user