1 // It's not yet clear how '_ and GATs should interact.
2 // Forbid it for now but proper support might be added
3 // at some point in the future.
5 #![feature(generic_associated_types)]
6 #![feature(anonymous_lifetime_in_impl_trait)]
11 fn foo(x: &impl Foo<Item<'_> = u32>) { }
12 //~^ ERROR `'_` cannot be used here [E0637]
14 // Ok: the anonymous lifetime is bound to the function.
15 fn bar(x: &impl for<'a> Foo<Item<'a> = &'_ u32>) { }
17 // Ok: the anonymous lifetime is bound to the function.
18 fn baz(x: &impl for<'a> Foo<Item<'a> = &u32>) { }