]> git.proxmox.com Git - rustc.git/blame - src/test/ui/no-send-res-ports.stderr
New upstream version 1.63.0+dfsg1
[rustc.git] / src / test / ui / no-send-res-ports.stderr
CommitLineData
1b1a35ee 1error[E0277]: `Rc<()>` cannot be sent between threads safely
ba9703b0 2 --> $DIR/no-send-res-ports.rs:25:5
b7449926 3 |
dfeec247
XL
4LL | thread::spawn(move|| {
5 | _____^^^^^^^^^^^^^_-
6 | | |
1b1a35ee 7 | | `Rc<()>` cannot be sent between threads safely
dfeec247
XL
8LL | |
9LL | | let y = x;
10LL | | println!("{:?}", y);
11LL | | });
1b1a35ee 12 | |_____- within this `[closure@$DIR/no-send-res-ports.rs:25:19: 29:6]`
e1599b0c 13 |
1b1a35ee 14 = help: within `[closure@$DIR/no-send-res-ports.rs:25:19: 29:6]`, the trait `Send` is not implemented for `Rc<()>`
cdc7bbd5
XL
15note: required because it appears within the type `Port<()>`
16 --> $DIR/no-send-res-ports.rs:5:8
17 |
18LL | struct Port<T>(Rc<T>);
19 | ^^^^
20note: required because it appears within the type `Foo`
21 --> $DIR/no-send-res-ports.rs:9:12
22 |
23LL | struct Foo {
24 | ^^^
923072b8
FG
25note: required because it's used within this closure
26 --> $DIR/no-send-res-ports.rs:25:19
27 |
28LL | thread::spawn(move|| {
29 | ___________________^
30LL | |
31LL | | let y = x;
32LL | | println!("{:?}", y);
33LL | | });
34 | |_____^
94222f64
XL
35note: required by a bound in `spawn`
36 --> $SRC_DIR/std/src/thread/mod.rs:LL:COL
37 |
38LL | F: Send + 'static,
39 | ^^^^ required by this bound in `spawn`
b7449926
XL
40
41error: aborting due to previous error
42
43For more information about this error, try `rustc --explain E0277`.