1 error[E0277]: `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
2 --> $DIR/closure-move-sync.rs:6:13
4 LL | let t = thread::spawn(|| {
5 | ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
7 ::: $SRC_DIR/std/src/thread/mod.rs:LL:COL
9 LL | F: Send + 'static,
10 | ---- required by this bound in `spawn`
12 = help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<()>`
13 = note: required because of the requirements on the impl of `Send` for `&std::sync::mpsc::Receiver<()>`
14 = note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:6:27: 9:6 recv:&std::sync::mpsc::Receiver<()>]`
16 error[E0277]: `Sender<()>` cannot be shared between threads safely
17 --> $DIR/closure-move-sync.rs:18:5
19 LL | thread::spawn(|| tx.send(()).unwrap());
20 | ^^^^^^^^^^^^^ `Sender<()>` cannot be shared between threads safely
22 ::: $SRC_DIR/std/src/thread/mod.rs:LL:COL
24 LL | F: Send + 'static,
25 | ---- required by this bound in `spawn`
27 = help: the trait `Sync` is not implemented for `Sender<()>`
28 = note: required because of the requirements on the impl of `Send` for `&Sender<()>`
29 = note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:18:19: 18:42 tx:&Sender<()>]`
31 error: aborting due to 2 previous errors
33 For more information about this error, try `rustc --explain E0277`.