1 error[E0277]: `Rc<Foo>` cannot be shared between threads safely
2 --> $DIR/issue-40827.rs:14:5
4 LL | f(Foo(Arc::new(Bar::B(None))));
5 | ^ `Rc<Foo>` cannot be shared between threads safely
7 = help: within `Bar`, the trait `Sync` is not implemented for `Rc<Foo>`
8 note: required because it appears within the type `Bar`
9 --> $DIR/issue-40827.rs:6:6
13 = note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
14 note: required because it appears within the type `Foo`
15 --> $DIR/issue-40827.rs:4:8
17 LL | struct Foo(Arc<Bar>);
19 note: required by a bound in `f`
20 --> $DIR/issue-40827.rs:11:9
22 LL | fn f<T: Send>(_: T) {}
23 | ^^^^ required by this bound in `f`
25 error[E0277]: `Rc<Foo>` cannot be sent between threads safely
26 --> $DIR/issue-40827.rs:14:5
28 LL | f(Foo(Arc::new(Bar::B(None))));
29 | ^ `Rc<Foo>` cannot be sent between threads safely
31 = help: within `Bar`, the trait `Send` is not implemented for `Rc<Foo>`
32 note: required because it appears within the type `Bar`
33 --> $DIR/issue-40827.rs:6:6
37 = note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
38 note: required because it appears within the type `Foo`
39 --> $DIR/issue-40827.rs:4:8
41 LL | struct Foo(Arc<Bar>);
43 note: required by a bound in `f`
44 --> $DIR/issue-40827.rs:11:9
46 LL | fn f<T: Send>(_: T) {}
47 | ^^^^ required by this bound in `f`
49 error: aborting due to 2 previous errors
51 For more information about this error, try `rustc --explain E0277`.