1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
// Regression test for #101350. // check-fail trait Trait { type Ty; } impl Trait for &'static () { type Ty = (); } fn extend<'a>() { None::<<&'a () as Trait>::Ty>; //~^ ERROR lifetime may not live long enough } fn main() {}