]>
Commit | Line | Data |
---|---|---|
1b1a35ee | 1 | error[E0277]: `Rc<()>` cannot be sent between threads safely |
f2b60f7d | 2 | --> $DIR/no-send-res-ports.rs:25:19 |
b7449926 | 3 | | |
f2b60f7d FG |
4 | LL | thread::spawn(move|| { |
5 | | ------------- ^----- | |
6 | | | | | |
781aab86 | 7 | | _____|_____________within this `{closure@$DIR/no-send-res-ports.rs:25:19: 25:25}` |
f2b60f7d FG |
8 | | | | |
9 | | | required by a bound introduced by this call | |
10 | LL | | | |
11 | LL | | let y = x; | |
12 | LL | | println!("{:?}", y); | |
13 | LL | | }); | |
14 | | |_____^ `Rc<()>` cannot be sent between threads safely | |
e1599b0c | 15 | | |
781aab86 | 16 | = help: within `{closure@$DIR/no-send-res-ports.rs:25:19: 25:25}`, the trait `Send` is not implemented for `Rc<()>` |
cdc7bbd5 XL |
17 | note: required because it appears within the type `Port<()>` |
18 | --> $DIR/no-send-res-ports.rs:5:8 | |
19 | | | |
20 | LL | struct Port<T>(Rc<T>); | |
21 | | ^^^^ | |
22 | note: required because it appears within the type `Foo` | |
23 | --> $DIR/no-send-res-ports.rs:9:12 | |
24 | | | |
25 | LL | struct Foo { | |
26 | | ^^^ | |
923072b8 FG |
27 | note: required because it's used within this closure |
28 | --> $DIR/no-send-res-ports.rs:25:19 | |
29 | | | |
064997fb FG |
30 | LL | thread::spawn(move|| { |
31 | | ^^^^^^ | |
94222f64 XL |
32 | note: required by a bound in `spawn` |
33 | --> $SRC_DIR/std/src/thread/mod.rs:LL:COL | |
b7449926 XL |
34 | |
35 | error: aborting due to previous error | |
36 | ||
37 | For more information about this error, try `rustc --explain E0277`. |