1 error[E0277]: `std::rc::Rc<Foo>` cannot be sent between threads safely
2 --> $DIR/issue-40827.rs:24:5
4 LL | f(Foo(Arc::new(Bar::B(None))));
5 | ^ `std::rc::Rc<Foo>` cannot be sent between threads safely
7 = help: within `Bar`, the trait `std::marker::Send` is not implemented for `std::rc::Rc<Foo>`
8 = note: required because it appears within the type `Bar`
9 = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<Bar>`
10 = note: required because it appears within the type `Foo`
12 --> $DIR/issue-40827.rs:21:1
14 LL | fn f<T: Send>(_: T) {}
17 error[E0277]: `std::rc::Rc<Foo>` cannot be shared between threads safely
18 --> $DIR/issue-40827.rs:24:5
20 LL | f(Foo(Arc::new(Bar::B(None))));
21 | ^ `std::rc::Rc<Foo>` cannot be shared between threads safely
23 = help: within `Bar`, the trait `std::marker::Sync` is not implemented for `std::rc::Rc<Foo>`
24 = note: required because it appears within the type `Bar`
25 = note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<Bar>`
26 = note: required because it appears within the type `Foo`
28 --> $DIR/issue-40827.rs:21:1
30 LL | fn f<T: Send>(_: T) {}
33 error: aborting due to 2 previous errors
35 For more information about this error, try `rustc --explain E0277`.