]> git.lizzy.rs Git - rust.git/blob - src/test/ui/no-send-res-ports.stderr
Rollup merge of #100112 - RalfJung:assert_send_and_sync, r=m-ou-se
[rust.git] / src / test / ui / no-send-res-ports.stderr
1 error[E0277]: `Rc<()>` cannot be sent between threads safely
2   --> $DIR/no-send-res-ports.rs:25:5
3    |
4 LL |     thread::spawn(move|| {
5    |     ^^^^^^^^^^^^^ ------ within this `[closure@$DIR/no-send-res-ports.rs:25:19: 25:25]`
6    |     |
7    |     `Rc<()>` cannot be sent between threads safely
8    |
9    = help: within `[closure@$DIR/no-send-res-ports.rs:25:19: 25:25]`, the trait `Send` is not implemented for `Rc<()>`
10 note: required because it appears within the type `Port<()>`
11   --> $DIR/no-send-res-ports.rs:5:8
12    |
13 LL | struct Port<T>(Rc<T>);
14    |        ^^^^
15 note: required because it appears within the type `Foo`
16   --> $DIR/no-send-res-ports.rs:9:12
17    |
18 LL |     struct Foo {
19    |            ^^^
20 note: required because it's used within this closure
21   --> $DIR/no-send-res-ports.rs:25:19
22    |
23 LL |     thread::spawn(move|| {
24    |                   ^^^^^^
25 note: required by a bound in `spawn`
26   --> $SRC_DIR/std/src/thread/mod.rs:LL:COL
27    |
28 LL |     F: Send + 'static,
29    |        ^^^^ required by this bound in `spawn`
30
31 error: aborting due to previous error
32
33 For more information about this error, try `rustc --explain E0277`.