fork/rust
git clone https://git.julia.blue/fork/rust
8d69840ab92
1.43.1
1error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely 2 --> $DIR/auto-trait-leak2.rs:13:5 3 | 4LL | fn before() -> impl Fn(i32) { 5 | ------------ within this `impl std::ops::Fn<(i32,)>` 6... 7LL | fn send<T: Send>(_: T) {} 8 | ---- ---- required by this bound in `send` 9... 10LL | send(before()); 11 | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely 12 | 13 = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>` 14 = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:7:5: 7:22 p:std::rc::Rc<std::cell::Cell<i32>>]` 15 = note: required because it appears within the type `impl std::ops::Fn<(i32,)>` 16 17error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely 18 --> $DIR/auto-trait-leak2.rs:16:5 19 | 20LL | fn send<T: Send>(_: T) {} 21 | ---- ---- required by this bound in `send` 22... 23LL | send(after()); 24 | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely 25... 26LL | fn after() -> impl Fn(i32) { 27 | ------------ within this `impl std::ops::Fn<(i32,)>` 28 | 29 = help: within `impl std::ops::Fn<(i32,)>`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<std::cell::Cell<i32>>` 30 = note: required because it appears within the type `[closure@$DIR/auto-trait-leak2.rs:24:5: 24:22 p:std::rc::Rc<std::cell::Cell<i32>>]` 31 = note: required because it appears within the type `impl std::ops::Fn<(i32,)>` 32 33error: aborting due to 2 previous errors 34 35For more information about this error, try `rustc --explain E0277`.