2016-07-28 15:27:11 +00:00
|
|
|
use std::cell::Cell;
|
|
|
|
use std::rc::Rc;
|
|
|
|
|
|
|
|
fn send<T: Send>(_: T) {}
|
|
|
|
|
2023-07-04 11:16:44 +00:00
|
|
|
fn main() {}
|
2016-07-28 15:27:11 +00:00
|
|
|
|
|
|
|
// Cycles should work as the deferred obligations are
|
|
|
|
// independently resolved and only require the concrete
|
|
|
|
// return type, which can't depend on the obligation.
|
|
|
|
fn cycle1() -> impl Clone {
|
|
|
|
send(cycle2().clone());
|
|
|
|
|
|
|
|
Rc::new(Cell::new(5))
|
|
|
|
}
|
|
|
|
|
|
|
|
fn cycle2() -> impl Clone {
|
|
|
|
send(cycle1().clone());
|
2023-07-04 11:16:44 +00:00
|
|
|
//~^ ERROR: cannot check whether the hidden type of opaque type satisfies auto traits
|
2016-07-28 15:27:11 +00:00
|
|
|
|
|
|
|
Rc::new(String::from("foo"))
|
|
|
|
}
|