fn f(x: &impl for<'a> X<Y<'a> = &'a ()>) -> &'static () {
x.m()
- //~^ ERROR `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement [E0759]
+ //~^ ERROR lifetime may not live long enough
}
fn g<T: for<'a> X<Y<'a> = &'a ()>>(x: &T) -> &'static () {
x.m()
- //~^ ERROR `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement [E0759]
+ //~^ ERROR lifetime may not live long enough
}
fn h(x: &()) -> &'static () {
x.m()
- //~^ ERROR `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement [E0759]
+ //~^ ERROR lifetime may not live long enough
}
fn main() {