File tree 2 files changed +4
-4
lines changed
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -346,11 +346,11 @@ pub trait Copy : Clone {
346
346
#[ rustc_on_unimplemented(
347
347
on(
348
348
_Self="std::sync::mpsc::Receiver<T>" ,
349
- label="`{Self}` cannot be shared safely, if using a closure consider marking it `move`"
349
+ label="`{Self}` cannot be shared safely, consider marking the closure `move`"
350
350
) ,
351
351
on(
352
352
_Self="std::sync::mpsc::Sender<T>" ,
353
- label="`{Self}` cannot be shared safely, if using a closure consider marking it `move`"
353
+ label="`{Self}` cannot be shared safely, consider marking the closure `move`"
354
354
) ,
355
355
message="`{Self}` cannot be shared between threads safely" ,
356
356
label="`{Self}` cannot be shared between threads safely"
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ error[E0277]: `std::sync::mpsc::Receiver<()>` cannot be shared between threads s
2
2
--> $DIR/closure-move-sync.rs:16:13
3
3
|
4
4
16 | let t = thread::spawn(|| {
5
- | ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<()>` cannot be shared safely, if using a closure consider marking it `move`
5
+ | ^^^^^^^^^^^^^ `std::sync::mpsc::Receiver<()>` cannot be shared safely, consider marking the closure `move`
6
6
|
7
7
= help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Receiver<()>`
8
8
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::mpsc::Receiver<()>`
@@ -13,7 +13,7 @@ error[E0277]: `std::sync::mpsc::Sender<()>` cannot be shared between threads saf
13
13
--> $DIR/closure-move-sync.rs:28:5
14
14
|
15
15
28 | thread::spawn(|| tx.send(()).unwrap());
16
- | ^^^^^^^^^^^^^ `std::sync::mpsc::Sender<()>` cannot be shared safely, if using a closure consider marking it `move`
16
+ | ^^^^^^^^^^^^^ `std::sync::mpsc::Sender<()>` cannot be shared safely, consider marking the closure `move`
17
17
|
18
18
= help: the trait `std::marker::Sync` is not implemented for `std::sync::mpsc::Sender<()>`
19
19
= note: required because of the requirements on the impl of `std::marker::Send` for `&std::sync::mpsc::Sender<()>`
You can’t perform that action at this time.
0 commit comments