fork/rust

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

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

master
1.7 KiB50 linesraw
1error: generator cannot be sent between threads safely
2  --> $DIR/ref-upvar-not-send.rs:15:17
3   |
4LL |       assert_send(move || {
5   |  _________________^
6LL | |
7LL | |
8LL | |         yield;
9LL | |         let _x = x;
10LL | |     });
11   | |_____^ generator is not `Send`
12   |
13   = help: the trait `Sync` is not implemented for `*mut ()`
14note: captured value is not `Send` because `&` references cannot be sent unless their referent is `Sync`
15  --> $DIR/ref-upvar-not-send.rs:19:18
16   |
17LL |         let _x = x;
18   |                  ^ has type `&*mut ()` which is not `Send`, because `*mut ()` is not `Sync`
19note: required by a bound in `assert_send`
20  --> $DIR/ref-upvar-not-send.rs:6:19
21   |
22LL | fn assert_send<T: Send>(_: T) {}
23   |                   ^^^^ required by this bound in `assert_send`
24
25error: generator cannot be sent between threads safely
26  --> $DIR/ref-upvar-not-send.rs:23:17
27   |
28LL |       assert_send(move || {
29   |  _________________^
30LL | |
31LL | |
32LL | |         yield;
33LL | |         let _y = y;
34LL | |     });
35   | |_____^ generator is not `Send`
36   |
37   = help: within `{generator@$DIR/ref-upvar-not-send.rs:23:17: 23:24}`, the trait `Send` is not implemented for `*mut ()`
38note: captured value is not `Send` because `&mut` references cannot be sent unless their referent is `Send`
39  --> $DIR/ref-upvar-not-send.rs:27:18
40   |
41LL |         let _y = y;
42   |                  ^ has type `&mut *mut ()` which is not `Send`, because `*mut ()` is not `Send`
43note: required by a bound in `assert_send`
44  --> $DIR/ref-upvar-not-send.rs:6:19
45   |
46LL | fn assert_send<T: Send>(_: T) {}
47   |                   ^^^^ required by this bound in `assert_send`
48
49error: aborting due to 2 previous errors
50