]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0277]: `Rc<Cell<i32>>` cannot be sent between threads safely |
923072b8 | 2 | --> $DIR/auto-trait-leak2.rs:20:10 |
94b46f34 | 3 | | |
dfeec247 | 4 | LL | fn before() -> impl Fn(i32) { |
3c0e092e | 5 | | ------------ within this `impl Fn(i32)` |
dfeec247 | 6 | ... |
94b46f34 | 7 | LL | send(before()); |
3c0e092e XL |
8 | | ---- ^^^^^^^^ `Rc<Cell<i32>>` cannot be sent between threads safely |
9 | | | | |
10 | | required by a bound introduced by this call | |
94b46f34 | 11 | | |
3c0e092e | 12 | = help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc<Cell<i32>>` |
923072b8 FG |
13 | note: required because it's used within this closure |
14 | --> $DIR/auto-trait-leak2.rs:10:5 | |
15 | | | |
16 | LL | move |x| p.set(x) | |
064997fb | 17 | | ^^^^^^^^ |
923072b8 FG |
18 | note: required because it appears within the type `impl Fn(i32)` |
19 | --> $DIR/auto-trait-leak2.rs:5:16 | |
20 | | | |
21 | LL | fn before() -> impl Fn(i32) { | |
22 | | ^^^^^^^^^^^^ | |
94222f64 | 23 | note: required by a bound in `send` |
923072b8 | 24 | --> $DIR/auto-trait-leak2.rs:13:12 |
94222f64 XL |
25 | | |
26 | LL | fn send<T: Send>(_: T) {} | |
27 | | ^^^^ required by this bound in `send` | |
94b46f34 | 28 | |
1b1a35ee | 29 | error[E0277]: `Rc<Cell<i32>>` cannot be sent between threads safely |
923072b8 | 30 | --> $DIR/auto-trait-leak2.rs:25:10 |
94b46f34 XL |
31 | | |
32 | LL | send(after()); | |
3c0e092e XL |
33 | | ---- ^^^^^^^ `Rc<Cell<i32>>` cannot be sent between threads safely |
34 | | | | |
35 | | required by a bound introduced by this call | |
dfeec247 XL |
36 | ... |
37 | LL | fn after() -> impl Fn(i32) { | |
3c0e092e | 38 | | ------------ within this `impl Fn(i32)` |
94b46f34 | 39 | | |
3c0e092e | 40 | = help: within `impl Fn(i32)`, the trait `Send` is not implemented for `Rc<Cell<i32>>` |
923072b8 FG |
41 | note: required because it's used within this closure |
42 | --> $DIR/auto-trait-leak2.rs:38:5 | |
43 | | | |
44 | LL | move |x| p.set(x) | |
064997fb | 45 | | ^^^^^^^^ |
923072b8 FG |
46 | note: required because it appears within the type `impl Fn(i32)` |
47 | --> $DIR/auto-trait-leak2.rs:33:15 | |
48 | | | |
49 | LL | fn after() -> impl Fn(i32) { | |
50 | | ^^^^^^^^^^^^ | |
94222f64 | 51 | note: required by a bound in `send` |
923072b8 | 52 | --> $DIR/auto-trait-leak2.rs:13:12 |
94222f64 XL |
53 | | |
54 | LL | fn send<T: Send>(_: T) {} | |
55 | | ^^^^ required by this bound in `send` | |
94b46f34 XL |
56 | |
57 | error: aborting due to 2 previous errors | |
58 | ||
59 | For more information about this error, try `rustc --explain E0277`. |