1 // ignore-compare-mode-chalk
3 type Next: Cycle<Next = Self>;
6 impl<T> Cycle for Box<T> {
10 impl<T> Cycle for Vec<T> {
14 trait X<'a, T: Cycle + for<'b> X<'b, T>>
16 for<'b> <T as X<'b, T>>::U: Clone,
17 for<'b> T::Next: X<'b, T::Next>,
18 for<'b> <T::Next as X<'b, T::Next>>::U: Clone,
21 fn f(x: &<T as X<'_, T>>::U) {
22 <<T as X<'_, T>>::U>::clone(x);
26 impl<S, T> X<'_, Vec<T>> for S {
28 //~^ ERROR the trait bound `for<'b> <Box<T> as X<'b, Box<T>>>::U: Clone` is not satisfied
29 //~| ERROR the trait bound `for<'b> <Vec<T> as X<'b, Vec<T>>>::U: Clone` is not satisfied
32 impl<S, T> X<'_, Box<T>> for S {
34 //~^ ERROR the trait bound `for<'b> <Box<T> as X<'b, Box<T>>>::U: Clone` is not satisfied
35 //~| ERROR the trait bound `for<'b> <Vec<T> as X<'b, Vec<T>>>::U: Clone` is not satisfied
39 <i32 as X<Box<i32>>>::f("abc");