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