]> git.lizzy.rs Git - rust.git/blob - src/test/ui/closures/closure-move-sync.stderr
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / ui / closures / closure-move-sync.stderr
1 error[E0277]: `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
2   --> $DIR/closure-move-sync.rs:16:13
3    |
4 LL |     let t = thread::spawn(|| {
5    |             ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
6    |
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`
11
12 error[E0277]: `std::sync::mpsc::Sender<()>` cannot be shared between threads safely
13   --> $DIR/closure-move-sync.rs:28:5
14    |
15 LL |     thread::spawn(|| tx.send(()).unwrap());
16    |     ^^^^^^^^^^^^^ `std::sync::mpsc::Sender<()>` cannot be shared between threads safely
17    |
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`
22
23 error: aborting due to 2 previous errors
24
25 For more information about this error, try `rustc --explain E0277`.