11error[E0277]: `Rc<()>` cannot be sent between threads safely
2- --> $DIR/no-send-res-ports .rs:25 :19
2+ --> $DIR/rc-is-not-send .rs:29 :19
33 |
4- LL | thread::spawn(move|| {
5- | ------------- ^-----
4+ LL | thread::spawn(move || {
5+ | ------------- ^------
66 | | |
7- | _____|_____________within this `{closure@$DIR/no-send-res-ports .rs:25 :19: 25:25 }`
7+ | _____|_____________within this `{closure@$DIR/rc-is-not-send .rs:29 :19: 29:26 }`
88 | | |
99 | | required by a bound introduced by this call
1010LL | |
@@ -13,22 +13,22 @@ LL | | println!("{:?}", y);
1313LL | | });
1414 | |_____^ `Rc<()>` cannot be sent between threads safely
1515 |
16- = help: within `{closure@$DIR/no-send-res-ports .rs:25 :19: 25:25 }`, the trait `Send` is not implemented for `Rc<()>`
16+ = help: within `{closure@$DIR/rc-is-not-send .rs:29 :19: 29:26 }`, the trait `Send` is not implemented for `Rc<()>`
1717note: required because it appears within the type `Port<()>`
18- --> $DIR/no-send-res-ports .rs:5 :8
18+ --> $DIR/rc-is-not-send .rs:11 :8
1919 |
2020LL | struct Port<T>(Rc<T>);
2121 | ^^^^
2222note: required because it appears within the type `Foo`
23- --> $DIR/no-send-res-ports .rs:9:12
23+ --> $DIR/rc-is-not-send .rs:14:8
2424 |
25- LL | struct Foo {
26- | ^^^
25+ LL | struct Foo {
26+ | ^^^
2727note: required because it's used within this closure
28- --> $DIR/no-send-res-ports .rs:25 :19
28+ --> $DIR/rc-is-not-send .rs:29 :19
2929 |
30- LL | thread::spawn(move|| {
31- | ^^^^^^
30+ LL | thread::spawn(move || {
31+ | ^^^^^^^
3232note: required by a bound in `spawn`
3333 --> $SRC_DIR/std/src/thread/mod.rs:LL:COL
3434
0 commit comments