]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely |
48663c56 | 2 | --> $DIR/auto-trait-leak2.rs:13:5 |
94b46f34 | 3 | | |
dfeec247 XL |
4 | LL | fn before() -> impl Fn(i32) { |
5 | | ------------ within this `impl std::ops::Fn<(i32,)>` | |
6 | ... | |
e1599b0c | 7 | LL | fn send<T: Send>(_: T) {} |
ba9703b0 | 8 | | ---- required by this bound in `send` |
e1599b0c | 9 | ... |
94b46f34 XL |
10 | LL | 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>>` | |
48663c56 | 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>>]` |
94b46f34 | 15 | = note: required because it appears within the type `impl std::ops::Fn<(i32,)>` |
94b46f34 | 16 | |
8faf50e0 | 17 | error[E0277]: `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely |
48663c56 | 18 | --> $DIR/auto-trait-leak2.rs:16:5 |
94b46f34 | 19 | | |
e1599b0c | 20 | LL | fn send<T: Send>(_: T) {} |
ba9703b0 | 21 | | ---- required by this bound in `send` |
e1599b0c | 22 | ... |
94b46f34 XL |
23 | LL | send(after()); |
24 | | ^^^^ `std::rc::Rc<std::cell::Cell<i32>>` cannot be sent between threads safely | |
dfeec247 XL |
25 | ... |
26 | LL | fn after() -> impl Fn(i32) { | |
27 | | ------------ within this `impl std::ops::Fn<(i32,)>` | |
94b46f34 XL |
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>>` | |
48663c56 | 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>>]` |
94b46f34 | 31 | = note: required because it appears within the type `impl std::ops::Fn<(i32,)>` |
94b46f34 XL |
32 | |
33 | error: aborting due to 2 previous errors | |
34 | ||
35 | For more information about this error, try `rustc --explain E0277`. |