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(anonymous_lifetime_in_impl_trait)]
10 fn foo(x: &impl Foo<Item<'_> = u32>) { }
11 //~^ ERROR `'_` cannot be used here [E0637]
13 // Ok: the anonymous lifetime is bound to the function.
14 fn bar(x: &impl for<'a> Foo<Item<'a> = &'_ u32>) { }
16 // Ok: the anonymous lifetime is bound to the function.
17 fn baz(x: &impl for<'a> Foo<Item<'a> = &u32>) { }