1 2 3 4 5 6 7 8 9 10 11 12
// check-pass trait Trait<T> { type Ty; } impl Trait<&u8> for () { type Ty = (); } fn test<'a, 'b>() -> impl Trait<&'a u8, Ty = impl Sized + 'b> {} fn main() {}