2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: `Rc<Foo>` cannot be sent between threads safely
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-40827.rs:14:5
|
2018-09-29 20:41:49 -05:00
|
|
|
|
|
2019-08-24 16:44:43 -05:00
|
|
|
LL | fn f<T: Send>(_: T) {}
|
2020-04-06 00:15:06 -05:00
|
|
|
| ---- required by this bound in `f`
|
2019-08-24 16:44:43 -05:00
|
|
|
...
|
2018-09-29 20:41:49 -05:00
|
|
|
LL | f(Foo(Arc::new(Bar::B(None))));
|
2020-09-02 02:40:56 -05:00
|
|
|
| ^ `Rc<Foo>` cannot be sent between threads safely
|
2018-09-29 20:41:49 -05:00
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: within `Bar`, the trait `Send` is not implemented for `Rc<Foo>`
|
2018-09-29 20:41:49 -05:00
|
|
|
= note: required because it appears within the type `Bar`
|
2020-09-02 02:40:56 -05:00
|
|
|
= note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
|
2018-09-29 20:41:49 -05:00
|
|
|
= note: required because it appears within the type `Foo`
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0277]: `Rc<Foo>` cannot be shared between threads safely
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/issue-40827.rs:14:5
|
2018-09-29 20:41:49 -05:00
|
|
|
|
|
2019-08-24 16:44:43 -05:00
|
|
|
LL | fn f<T: Send>(_: T) {}
|
2020-04-06 00:15:06 -05:00
|
|
|
| ---- required by this bound in `f`
|
2019-08-24 16:44:43 -05:00
|
|
|
...
|
2018-09-29 20:41:49 -05:00
|
|
|
LL | f(Foo(Arc::new(Bar::B(None))));
|
2020-09-02 02:40:56 -05:00
|
|
|
| ^ `Rc<Foo>` cannot be shared between threads safely
|
2018-09-29 20:41:49 -05:00
|
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
= help: within `Bar`, the trait `Sync` is not implemented for `Rc<Foo>`
|
2018-09-29 20:41:49 -05:00
|
|
|
= note: required because it appears within the type `Bar`
|
2020-09-02 02:40:56 -05:00
|
|
|
= note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
|
2018-09-29 20:41:49 -05:00
|
|
|
= note: required because it appears within the type `Foo`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|