1 error[E0277]: `Rc<Cell<i32>>` cannot be sent between threads safely
2 --> $DIR/auto-trait-leak2.rs:13:5
4 LL | fn before() -> impl Fn(i32) {
5 | ------------ within this `impl Fn<(i32,)>`
7 LL | fn send<T: Send>(_: T) {}
8 | ---- required by this bound in `send`
11 | ^^^^ `Rc<Cell<i32>>` cannot be sent between threads safely
13 = help: within `impl Fn<(i32,)>`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
14 = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:7:5: 7:22]`
15 = note: required because it appears within the type `impl Fn<(i32,)>`
17 error[E0277]: `Rc<Cell<i32>>` cannot be sent between threads safely
18 --> $DIR/auto-trait-leak2.rs:16:5
20 LL | fn send<T: Send>(_: T) {}
21 | ---- required by this bound in `send`
24 | ^^^^ `Rc<Cell<i32>>` cannot be sent between threads safely
26 LL | fn after() -> impl Fn(i32) {
27 | ------------ within this `impl Fn<(i32,)>`
29 = help: within `impl Fn<(i32,)>`, the trait `Send` is not implemented for `Rc<Cell<i32>>`
30 = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:24:5: 24:22]`
31 = note: required because it appears within the type `impl Fn<(i32,)>`
33 error: aborting due to 2 previous errors
35 For more information about this error, try `rustc --explain E0277`.