1 error[E0277]: `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
2 --> $DIR/closure-move-sync.rs:6:27
4 LL | let t = thread::spawn(|| {
5 | _____________-------------_^
7 | | required by a bound introduced by this call
8 LL | | recv.recv().unwrap();
11 | |_____^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
13 = help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<()>`
14 = note: required for `&std::sync::mpsc::Receiver<()>` to implement `Send`
15 note: required because it's used within this closure
16 --> $DIR/closure-move-sync.rs:6:27
18 LL | let t = thread::spawn(|| {
20 note: required by a bound in `spawn`
21 --> $SRC_DIR/std/src/thread/mod.rs:LL:COL
23 error[E0277]: `Sender<()>` cannot be shared between threads safely
24 --> $DIR/closure-move-sync.rs:18:19
26 LL | thread::spawn(|| tx.send(()).unwrap());
27 | ------------- ^^^^^^^^^^^^^^^^^^^^^^^ `Sender<()>` cannot be shared between threads safely
29 | required by a bound introduced by this call
31 = help: the trait `Sync` is not implemented for `Sender<()>`
32 = note: required for `&Sender<()>` to implement `Send`
33 note: required because it's used within this closure
34 --> $DIR/closure-move-sync.rs:18:19
36 LL | thread::spawn(|| tx.send(()).unwrap());
38 note: required by a bound in `spawn`
39 --> $SRC_DIR/std/src/thread/mod.rs:LL:COL
41 error: aborting due to 2 previous errors
43 For more information about this error, try `rustc --explain E0277`.