fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0277]: `Rc<Foo>` cannot be shared between threads safely 2 --> $DIR/issue-40827.rs:14:7 3 | 4LL | f(Foo(Arc::new(Bar::B(None)))); 5 | - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Rc<Foo>` cannot be shared between threads safely 6 | | 7 | required by a bound introduced by this call 8 | 9 = help: within `Bar`, the trait `Sync` is not implemented for `Rc<Foo>` 10note: required because it appears within the type `Bar` 11 --> $DIR/issue-40827.rs:6:6 12 | 13LL | enum Bar { 14 | ^^^ 15 = note: required for `Arc<Bar>` to implement `Send` 16note: required because it appears within the type `Foo` 17 --> $DIR/issue-40827.rs:4:8 18 | 19LL | struct Foo(Arc<Bar>); 20 | ^^^ 21note: required by a bound in `f` 22 --> $DIR/issue-40827.rs:11:9 23 | 24LL | fn f<T: Send>(_: T) {} 25 | ^^^^ required by this bound in `f` 26 27error[E0277]: `Rc<Foo>` cannot be sent between threads safely 28 --> $DIR/issue-40827.rs:14:7 29 | 30LL | f(Foo(Arc::new(Bar::B(None)))); 31 | - ^^^^^^^^^^^^^^^^^^^^^^^^^^^ `Rc<Foo>` cannot be sent between threads safely 32 | | 33 | required by a bound introduced by this call 34 | 35 = help: within `Bar`, the trait `Send` is not implemented for `Rc<Foo>` 36note: required because it appears within the type `Bar` 37 --> $DIR/issue-40827.rs:6:6 38 | 39LL | enum Bar { 40 | ^^^ 41 = note: required for `Arc<Bar>` to implement `Send` 42note: required because it appears within the type `Foo` 43 --> $DIR/issue-40827.rs:4:8 44 | 45LL | struct Foo(Arc<Bar>); 46 | ^^^ 47note: required by a bound in `f` 48 --> $DIR/issue-40827.rs:11:9 49 | 50LL | fn f<T: Send>(_: T) {} 51 | ^^^^ required by this bound in `f` 52 53error: aborting due to 2 previous errors 54 55For more information about this error, try `rustc --explain E0277`.