]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-40827.stderr
New upstream version 1.60.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-40827.stderr
CommitLineData
6a06907d 1error[E0277]: `Rc<Foo>` cannot be shared between threads safely
3c0e092e 2 --> $DIR/issue-40827.rs:14:7
0bf4aa26
XL
3 |
4LL | f(Foo(Arc::new(Bar::B(None))));
3c0e092e
XL
5 | - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Rc<Foo>` cannot be shared between threads safely
6 | |
7 | required by a bound introduced by this call
0bf4aa26 8 |
6a06907d 9 = help: within `Bar`, the trait `Sync` is not implemented for `Rc<Foo>`
cdc7bbd5
XL
10note: required because it appears within the type `Bar`
11 --> $DIR/issue-40827.rs:6:6
12 |
13LL | enum Bar {
14 | ^^^
1b1a35ee 15 = note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
cdc7bbd5
XL
16note: required because it appears within the type `Foo`
17 --> $DIR/issue-40827.rs:4:8
18 |
19LL | struct Foo(Arc<Bar>);
20 | ^^^
94222f64
XL
21note: required by a bound in `f`
22 --> $DIR/issue-40827.rs:11:9
23 |
24LL | fn f<T: Send>(_: T) {}
25 | ^^^^ required by this bound in `f`
0bf4aa26 26
6a06907d 27error[E0277]: `Rc<Foo>` cannot be sent between threads safely
3c0e092e 28 --> $DIR/issue-40827.rs:14:7
0bf4aa26
XL
29 |
30LL | f(Foo(Arc::new(Bar::B(None))));
3c0e092e
XL
31 | - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Rc<Foo>` cannot be sent between threads safely
32 | |
33 | required by a bound introduced by this call
0bf4aa26 34 |
6a06907d 35 = help: within `Bar`, the trait `Send` is not implemented for `Rc<Foo>`
cdc7bbd5
XL
36note: required because it appears within the type `Bar`
37 --> $DIR/issue-40827.rs:6:6
38 |
39LL | enum Bar {
40 | ^^^
1b1a35ee 41 = note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
cdc7bbd5
XL
42note: required because it appears within the type `Foo`
43 --> $DIR/issue-40827.rs:4:8
44 |
45LL | struct Foo(Arc<Bar>);
46 | ^^^
94222f64
XL
47note: required by a bound in `f`
48 --> $DIR/issue-40827.rs:11:9
49 |
50LL | fn f<T: Send>(_: T) {}
51 | ^^^^ required by this bound in `f`
0bf4aa26
XL
52
53error: aborting due to 2 previous errors
54
55For more information about this error, try `rustc --explain E0277`.