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