1 // ignore-compare-mode-chalk 2 trait Z<'a, T: ?Sized> 3 where 4 T: Z<'a, u16>, 5 //~^ the trait bound `str: Clone` is not satisfied 6 //~| the trait bound `str: Clone` is not satisfied 7 for<'b> <T as Z<'b, u16>>::W: Clone, 8 { 9 type W: ?Sized; h(&self, x: &T::W)10 fn h(&self, x: &T::W) { 11 <T::W>::clone(x); 12 } 13 } 14 15 impl<'a> Z<'a, u16> for u16 { 16 type W = str; 17 //~^ ERROR the trait bound `str: Clone 18 } 19 main()20fn main() { 21 1u16.h("abc"); 22 } 23