1 error[E0277]: `Rc<Foo>` cannot be sent between threads safely
2 --> $DIR/issue-40827.rs:14:5
4 LL | fn f<T: Send>(_: T) {}
5 | ---- required by this bound in `f`
7 LL | f(Foo(Arc::new(Bar::B(None))));
8 | ^ `Rc<Foo>` cannot be sent between threads safely
10 = help: within `Bar`, the trait `Send` is not implemented for `Rc<Foo>`
11 = note: required because it appears within the type `Bar`
12 = note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
13 = note: required because it appears within the type `Foo`
15 error[E0277]: `Rc<Foo>` cannot be shared between threads safely
16 --> $DIR/issue-40827.rs:14:5
18 LL | fn f<T: Send>(_: T) {}
19 | ---- required by this bound in `f`
21 LL | f(Foo(Arc::new(Bar::B(None))));
22 | ^ `Rc<Foo>` cannot be shared between threads safely
24 = help: within `Bar`, the trait `Sync` is not implemented for `Rc<Foo>`
25 = note: required because it appears within the type `Bar`
26 = note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
27 = note: required because it appears within the type `Foo`
29 error: aborting due to 2 previous errors
31 For more information about this error, try `rustc --explain E0277`.