2018-02-11 21:39:32 +00:00
|
|
|
error[E0277]: `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
|
2022-08-16 06:27:22 +00:00
|
|
|
--> $DIR/closure-move-sync.rs:6:27
|
2018-02-11 21:39:32 +00:00
|
|
|
|
|
2022-08-16 06:27:22 +00:00
|
|
|
LL | let t = thread::spawn(|| {
|
|
|
|
| _____________-------------_^
|
|
|
|
| | |
|
|
|
|
| | required by a bound introduced by this call
|
|
|
|
LL | | recv.recv().unwrap();
|
|
|
|
LL | |
|
|
|
|
LL | | });
|
|
|
|
| |_____^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
|
2021-06-10 11:52:00 +00:00
|
|
|
|
|
2024-10-24 21:14:17 +00:00
|
|
|
= help: the trait `Sync` is not implemented for `std::sync::mpsc::Receiver<()>`
|
2022-08-15 20:31:37 +00:00
|
|
|
= note: required for `&std::sync::mpsc::Receiver<()>` to implement `Send`
|
2022-06-19 18:59:36 +00:00
|
|
|
note: required because it's used within this closure
|
|
|
|
--> $DIR/closure-move-sync.rs:6:27
|
|
|
|
|
|
2022-06-27 05:45:35 +00:00
|
|
|
LL | let t = thread::spawn(|| {
|
|
|
|
| ^^
|
2021-07-31 16:26:55 +00:00
|
|
|
note: required by a bound in `spawn`
|
|
|
|
--> $SRC_DIR/std/src/thread/mod.rs:LL:COL
|
2018-02-11 21:39:32 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-02-11 21:39:32 +00:00
|
|
|
|
2018-03-15 01:10:25 +00:00
|
|
|
For more information about this error, try `rustc --explain E0277`.
|