fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

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