fork/rust

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

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

master
1.5 KiB42 linesraw
1error: generator cannot be shared between threads safely
2  --> $DIR/not-send-sync.rs:14:5
3   |
4LL |     assert_sync(|| {
5   |     ^^^^^^^^^^^ generator is not `Sync`
6   |
7   = help: within `{generator@$DIR/not-send-sync.rs:14:17: 14:19}`, the trait `Sync` is not implemented for `NotSync`
8note: generator is not `Sync` as this value is used across a yield
9  --> $DIR/not-send-sync.rs:17:9
10   |
11LL |         let a = NotSync;
12   |             - has type `NotSync` which is not `Sync`
13LL |         yield;
14   |         ^^^^^ yield occurs here, with `a` maybe used later
15note: required by a bound in `assert_sync`
16  --> $DIR/not-send-sync.rs:11:23
17   |
18LL |     fn assert_sync<T: Sync>(_: T) {}
19   |                       ^^^^ required by this bound in `assert_sync`
20
21error: generator cannot be sent between threads safely
22  --> $DIR/not-send-sync.rs:21:5
23   |
24LL |     assert_send(|| {
25   |     ^^^^^^^^^^^ generator is not `Send`
26   |
27   = help: within `{generator@$DIR/not-send-sync.rs:21:17: 21:19}`, the trait `Send` is not implemented for `NotSend`
28note: generator is not `Send` as this value is used across a yield
29  --> $DIR/not-send-sync.rs:24:9
30   |
31LL |         let a = NotSend;
32   |             - has type `NotSend` which is not `Send`
33LL |         yield;
34   |         ^^^^^ yield occurs here, with `a` maybe used later
35note: required by a bound in `assert_send`
36  --> $DIR/not-send-sync.rs:12:23
37   |
38LL |     fn assert_send<T: Send>(_: T) {}
39   |                       ^^^^ required by this bound in `assert_send`
40
41error: aborting due to 2 previous errors
42