trait Cycle: Sized { type Next: Cycle; } impl Cycle for Box { type Next = Vec; } impl Cycle for Vec { type Next = Box; } trait X<'a, T: Cycle + for<'b> X<'b, T>> where for<'b> >::U: Clone, for<'b> T::Next: X<'b, T::Next>, for<'b> >::U: Clone, { type U: ?Sized; fn f(x: &>::U) { <>::U>::clone(x); } } impl X<'_, Vec> for S { type U = str; //~^ ERROR the trait bound `str: Clone` is not satisfied } impl X<'_, Box> for S { type U = str; //~^ ERROR the trait bound `str: Clone` is not satisfied } pub fn main() { >>::f("abc"); }