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