1
1
error[E0277]: `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
2
- --> $DIR/closure-move-sync.rs:6 :13
2
+ --> $DIR/closure-move-sync.rs:8 :13
3
3
|
4
4
LL | let t = thread::spawn(|| {
5
5
| ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<()>` cannot be shared between threads safely
@@ -11,10 +11,10 @@ LL | F: FnOnce() -> T, F: Send + 'static, T: Send + 'static
11
11
|
12
12
= help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Receiver<()>`
13
13
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::mpsc::Receiver<()>`
14
- = note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:6 :27: 9 :6 recv:&std::sync::mpsc::Receiver<()>]`
14
+ = note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:8 :27: 11 :6 recv:&std::sync::mpsc::Receiver<()>]`
15
15
16
16
error[E0277]: `std::sync::mpsc::Sender<()>` cannot be shared between threads safely
17
- --> $DIR/closure-move-sync.rs:18 :5
17
+ --> $DIR/closure-move-sync.rs:20 :5
18
18
|
19
19
LL | thread::spawn(|| tx.send(()).unwrap());
20
20
| ^^^^^^^^^^^^^ `std::sync::mpsc::Sender<()>` cannot be shared between threads safely
@@ -26,7 +26,7 @@ LL | F: FnOnce() -> T, F: Send + 'static, T: Send + 'static
26
26
|
27
27
= help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Sender<()>`
28
28
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::mpsc::Sender<()>`
29
- = note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:18 :19: 18 :42 tx:&std::sync::mpsc::Sender<()>]`
29
+ = note: required because it appears within the type `[closure@$DIR/closure-move-sync.rs:20 :19: 20 :42 tx:&std::sync::mpsc::Sender<()>]`
30
30
31
31
error: aborting due to 2 previous errors
32
32
0 commit comments