]>
Commit | Line | Data |
---|---|---|
6a06907d | 1 | error[E0277]: `Rc<Foo>` cannot be shared between threads safely |
3c0e092e | 2 | --> $DIR/issue-40827.rs:14:7 |
0bf4aa26 XL |
3 | | |
4 | LL | 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 |
10 | note: required because it appears within the type `Bar` |
11 | --> $DIR/issue-40827.rs:6:6 | |
12 | | | |
13 | LL | enum Bar { | |
14 | | ^^^ | |
1b1a35ee | 15 | = note: required because of the requirements on the impl of `Send` for `Arc<Bar>` |
cdc7bbd5 XL |
16 | note: required because it appears within the type `Foo` |
17 | --> $DIR/issue-40827.rs:4:8 | |
18 | | | |
19 | LL | struct Foo(Arc<Bar>); | |
20 | | ^^^ | |
94222f64 XL |
21 | note: required by a bound in `f` |
22 | --> $DIR/issue-40827.rs:11:9 | |
23 | | | |
24 | LL | fn f<T: Send>(_: T) {} | |
25 | | ^^^^ required by this bound in `f` | |
0bf4aa26 | 26 | |
6a06907d | 27 | error[E0277]: `Rc<Foo>` cannot be sent between threads safely |
3c0e092e | 28 | --> $DIR/issue-40827.rs:14:7 |
0bf4aa26 XL |
29 | | |
30 | LL | 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 |
36 | note: required because it appears within the type `Bar` |
37 | --> $DIR/issue-40827.rs:6:6 | |
38 | | | |
39 | LL | enum Bar { | |
40 | | ^^^ | |
1b1a35ee | 41 | = note: required because of the requirements on the impl of `Send` for `Arc<Bar>` |
cdc7bbd5 XL |
42 | note: required because it appears within the type `Foo` |
43 | --> $DIR/issue-40827.rs:4:8 | |
44 | | | |
45 | LL | struct Foo(Arc<Bar>); | |
46 | | ^^^ | |
94222f64 XL |
47 | note: required by a bound in `f` |
48 | --> $DIR/issue-40827.rs:11:9 | |
49 | | | |
50 | LL | fn f<T: Send>(_: T) {} | |
51 | | ^^^^ required by this bound in `f` | |
0bf4aa26 XL |
52 | |
53 | error: aborting due to 2 previous errors | |
54 | ||
55 | For more information about this error, try `rustc --explain E0277`. |