fork/rust

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

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
1.3 KiB28 linesraw
1error[E0277]: `(dyn Dummy + 'a)` cannot be shared between threads safely
2  --> $DIR/kindck-send-object1.rs:10:5
3   |
4LL | fn assert_send<T:Send+'static>() { }
5   |    -----------   ---- required by this bound in `assert_send`
6...
7LL |     assert_send::<&'a dyn Dummy>();
8   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be shared between threads safely
9   |
10   = help: the trait `std::marker::Sync` is not implemented for `(dyn Dummy + 'a)`
11   = note: required because of the requirements on the impl of `std::marker::Send` for `&'a (dyn Dummy + 'a)`
12
13error[E0277]: `(dyn Dummy + 'a)` cannot be sent between threads safely
14  --> $DIR/kindck-send-object1.rs:29:5
15   |
16LL | fn assert_send<T:Send+'static>() { }
17   |    -----------   ---- required by this bound in `assert_send`
18...
19LL |     assert_send::<Box<dyn Dummy + 'a>>();
20   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `(dyn Dummy + 'a)` cannot be sent between threads safely
21   |
22   = help: the trait `std::marker::Send` is not implemented for `(dyn Dummy + 'a)`
23   = note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<(dyn Dummy + 'a)>`
24   = note: required because it appears within the type `std::boxed::Box<(dyn Dummy + 'a)>`
25
26error: aborting due to 2 previous errors
27
28For more information about this error, try `rustc --explain E0277`.