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