1 // ignore-tidy-linelength
6 fn send<T: Send>(_: T) {}
11 // Cycles should work as the deferred obligations are
12 // independently resolved and only require the concrete
13 // return type, which can't depend on the obligation.
14 fn cycle1() -> impl Clone {
15 //~^ ERROR cycle detected
16 //~| ERROR cycle detected
17 send(cycle2().clone());
18 //~^ ERROR cannot be sent between threads safely
23 fn cycle2() -> impl Clone {
24 send(cycle1().clone());
26 Rc::new(String::from("foo"))