1 // Regression test for #47511: anonymous lifetimes can appear
2 // unconstrained in a return type, but only if they appear just once
3 // in the input, as the input to a projection.
6 //~^ ERROR return type references an anonymous lifetime
10 fn g<'a>(_: X<'a>) -> X<'a> {
11 //~^ ERROR return type references lifetime `'a`, which is not constrained
15 type X<'a> = <&'a () as Trait>::Value;
21 impl<'a> Trait for &'a () {