rust/src/test/ui/issues/issue-40827.stderr

32 lines
1.2 KiB
Plaintext

error[E0277]: `Rc<Foo>` cannot be shared between threads safely
--> $DIR/issue-40827.rs:14:5
|
LL | fn f<T: Send>(_: T) {}
| ---- required by this bound in `f`
...
LL | f(Foo(Arc::new(Bar::B(None))));
| ^ `Rc<Foo>` cannot be shared between threads safely
|
= help: within `Bar`, the trait `Sync` is not implemented for `Rc<Foo>`
= note: required because it appears within the type `Bar`
= note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
= note: required because it appears within the type `Foo`
error[E0277]: `Rc<Foo>` cannot be sent between threads safely
--> $DIR/issue-40827.rs:14:5
|
LL | fn f<T: Send>(_: T) {}
| ---- required by this bound in `f`
...
LL | f(Foo(Arc::new(Bar::B(None))));
| ^ `Rc<Foo>` cannot be sent between threads safely
|
= help: within `Bar`, the trait `Send` is not implemented for `Rc<Foo>`
= note: required because it appears within the type `Bar`
= note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
= 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`.