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 LL | F: Send + 'static,
24 | ^^^^ required by this bound in `spawn`
26 error[E0277]: `Sender<()>` cannot be shared between threads safely
27 --> $DIR/closure-move-sync.rs:18:19
29 LL | thread::spawn(|| tx.send(()).unwrap());
30 | ------------- ^^^^^^^^^^^^^^^^^^^^^^^ `Sender<()>` cannot be shared between threads safely
32 | required by a bound introduced by this call
34 = help: the trait `Sync` is not implemented for `Sender<()>`
35 = note: required for `&Sender<()>` to implement `Send`
36 note: required because it's used within this closure
37 --> $DIR/closure-move-sync.rs:18:19
39 LL | thread::spawn(|| tx.send(()).unwrap());
41 note: required by a bound in `spawn`
42 --> $SRC_DIR/std/src/thread/mod.rs:LL:COL
44 LL | F: Send + 'static,
45 | ^^^^ required by this bound in `spawn`
47 error: aborting due to 2 previous errors
49 For more information about this error, try `rustc --explain E0277`.