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