mirror of https://github.com/rust-lang/rust.git
Rollup merge of #116561 - ouz-a:testfor_115517, r=compiler-errors
Add a test for fixed ICE Addresses https://github.com/rust-lang/rust/issues/115517#issuecomment-1730164116 Closes #115517 r? ``@compiler-errors``
This commit is contained in:
commit
27a5146e7c
|
@ -0,0 +1,16 @@
|
|||
// Test for issues/115517 which is fixed by pull/115486
|
||||
// This should not ice
|
||||
trait Test<const C: usize> {}
|
||||
|
||||
trait Elide<T> {
|
||||
fn call();
|
||||
}
|
||||
|
||||
pub fn test()
|
||||
where
|
||||
(): Test<{ 1 + (<() as Elide(&())>::call) }>,
|
||||
//~^ ERROR cannot capture late-bound lifetime in constant
|
||||
{
|
||||
}
|
||||
|
||||
fn main() {}
|
|
@ -0,0 +1,10 @@
|
|||
error: cannot capture late-bound lifetime in constant
|
||||
--> $DIR/escaping_bound_vars.rs:11:35
|
||||
|
|
||||
LL | (): Test<{ 1 + (<() as Elide(&())>::call) }>,
|
||||
| -^
|
||||
| |
|
||||
| lifetime defined here
|
||||
|
||||
error: aborting due to previous error
|
||||
|
Loading…
Reference in New Issue