This commit is contained in:
Oğuz Ağcayazı 2023-10-09 13:30:21 +03:00
parent 093b9d5b29
commit 2e000ebaa5
2 changed files with 26 additions and 0 deletions

View File

@ -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() {}

View File

@ -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