summaryrefslogtreecommitdiffstats
path: root/tests/ui/typeck/escaping_bound_vars.rs
blob: 1fb063d2c2689f0e0d258aa27e3fffe0b6159985 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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() {}