fork/rust

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

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

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