#![feature(generic_associated_types)] #![allow(incomplete_features)] trait Trait { type Type<'a> where T: 'a; fn foo(x: &T) -> Self::Type<'_>; } impl Trait for () { type Type<'a> where T: 'a = &'a T; fn foo(x: &T) -> Self::Type<'_> { x } }