1 error[E0277]: `Rc<Foo>` cannot be shared between threads safely
2 --> $DIR/issue-40827.rs:14:7
4 LL | f(Foo(Arc::new(Bar::B(None))));
5 | - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Rc<Foo>` cannot be shared between threads safely
7 | required by a bound introduced by this call
9 = help: within `Bar`, the trait `Sync` is not implemented for `Rc<Foo>`
10 note: required because it appears within the type `Bar`
11 --> $DIR/issue-40827.rs:6:6
15 = note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
16 note: required because it appears within the type `Foo`
17 --> $DIR/issue-40827.rs:4:8
19 LL | struct Foo(Arc<Bar>);
21 note: required by a bound in `f`
22 --> $DIR/issue-40827.rs:11:9
24 LL | fn f<T: Send>(_: T) {}
25 | ^^^^ required by this bound in `f`
27 error[E0277]: `Rc<Foo>` cannot be sent between threads safely
28 --> $DIR/issue-40827.rs:14:7
30 LL | f(Foo(Arc::new(Bar::B(None))));
31 | - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Rc<Foo>` cannot be sent between threads safely
33 | required by a bound introduced by this call
35 = help: within `Bar`, the trait `Send` is not implemented for `Rc<Foo>`
36 note: required because it appears within the type `Bar`
37 --> $DIR/issue-40827.rs:6:6
41 = note: required because of the requirements on the impl of `Send` for `Arc<Bar>`
42 note: required because it appears within the type `Foo`
43 --> $DIR/issue-40827.rs:4:8
45 LL | struct Foo(Arc<Bar>);
47 note: required by a bound in `f`
48 --> $DIR/issue-40827.rs:11:9
50 LL | fn f<T: Send>(_: T) {}
51 | ^^^^ required by this bound in `f`
53 error: aborting due to 2 previous errors
55 For more information about this error, try `rustc --explain E0277`.