1 #![feature(generic_associated_types)]
4 type Y<'a> where Self: 'a;
5 fn m(&self) -> Self::Y<'_>;
11 fn m(&self) -> Self::Y<'_> {
16 fn f(x: &impl for<'a> X<Y<'a> = &'a ()>) -> &'static () {
18 //~^ ERROR `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement [E0759]
21 fn g<T: for<'a> X<Y<'a> = &'a ()>>(x: &T) -> &'static () {
23 //~^ ERROR `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement [E0759]
26 fn h(x: &()) -> &'static () {
28 //~^ ERROR `x` has an anonymous lifetime `'_` but it needs to satisfy a `'static` lifetime requirement [E0759]