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