4 // Fast path, main can see the concrete type returned.
5 fn before() -> impl Fn(i32) {
6 let p = Rc::new(Cell::new(0));
10 fn send<T: Send>(_: T) {}
14 //~^ ERROR `Rc<Cell<i32>>` cannot be sent between threads safely
17 //~^ ERROR `Rc<Cell<i32>>` cannot be sent between threads safely
20 // Deferred path, main has to wait until typeck finishes,
21 // to check if the return type of after is Send.
22 fn after() -> impl Fn(i32) {
23 let p = Rc::new(Cell::new(0));