]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generator/partial-drop.stderr
Auto merge of #102655 - joboet:windows_tls_opt, r=ChrisDenton
[rust.git] / src / test / ui / generator / partial-drop.stderr
1 error: generator cannot be sent between threads safely
2   --> $DIR/partial-drop.rs:14:17
3    |
4 LL |       assert_send(|| {
5    |  _________________^
6 LL | |
7 LL | |         // FIXME: it would be nice to make this work.
8 LL | |         let guard = Bar { foo: Foo, x: 42 };
9 LL | |         drop(guard.foo);
10 LL | |         yield;
11 LL | |     });
12    | |_____^ generator is not `Send`
13    |
14    = help: within `[generator@$DIR/partial-drop.rs:14:17: 14:19]`, the trait `Send` is not implemented for `Foo`
15 note: generator is not `Send` as this value is used across a yield
16   --> $DIR/partial-drop.rs:19:9
17    |
18 LL |         let guard = Bar { foo: Foo, x: 42 };
19    |             ----- has type `Bar` which is not `Send`
20 LL |         drop(guard.foo);
21 LL |         yield;
22    |         ^^^^^ yield occurs here, with `guard` maybe used later
23 LL |     });
24    |     - `guard` is later dropped here
25 note: required by a bound in `assert_send`
26   --> $DIR/partial-drop.rs:42:19
27    |
28 LL | fn assert_send<T: Send>(_: T) {}
29    |                   ^^^^ required by this bound in `assert_send`
30
31 error: generator cannot be sent between threads safely
32   --> $DIR/partial-drop.rs:22:17
33    |
34 LL |       assert_send(|| {
35    |  _________________^
36 LL | |
37 LL | |         // FIXME: it would be nice to make this work.
38 LL | |         let guard = Bar { foo: Foo, x: 42 };
39 ...  |
40 LL | |         yield;
41 LL | |     });
42    | |_____^ generator is not `Send`
43    |
44    = help: within `[generator@$DIR/partial-drop.rs:22:17: 22:19]`, the trait `Send` is not implemented for `Foo`
45 note: generator is not `Send` as this value is used across a yield
46   --> $DIR/partial-drop.rs:29:9
47    |
48 LL |         let guard = Bar { foo: Foo, x: 42 };
49    |             ----- has type `Bar` which is not `Send`
50 ...
51 LL |         yield;
52    |         ^^^^^ yield occurs here, with `guard` maybe used later
53 LL |     });
54    |     - `guard` is later dropped here
55 note: required by a bound in `assert_send`
56   --> $DIR/partial-drop.rs:42:19
57    |
58 LL | fn assert_send<T: Send>(_: T) {}
59    |                   ^^^^ required by this bound in `assert_send`
60
61 error: generator cannot be sent between threads safely
62   --> $DIR/partial-drop.rs:32:17
63    |
64 LL |       assert_send(|| {
65    |  _________________^
66 LL | |
67 LL | |         // FIXME: it would be nice to make this work.
68 LL | |         let guard = Bar { foo: Foo, x: 42 };
69 ...  |
70 LL | |         yield;
71 LL | |     });
72    | |_____^ generator is not `Send`
73    |
74    = help: within `[generator@$DIR/partial-drop.rs:32:17: 32:19]`, the trait `Send` is not implemented for `Foo`
75 note: generator is not `Send` as this value is used across a yield
76   --> $DIR/partial-drop.rs:38:9
77    |
78 LL |         let guard = Bar { foo: Foo, x: 42 };
79    |             ----- has type `Bar` which is not `Send`
80 ...
81 LL |         yield;
82    |         ^^^^^ yield occurs here, with `guard` maybe used later
83 LL |     });
84    |     - `guard` is later dropped here
85 note: required by a bound in `assert_send`
86   --> $DIR/partial-drop.rs:42:19
87    |
88 LL | fn assert_send<T: Send>(_: T) {}
89    |                   ^^^^ required by this bound in `assert_send`
90
91 error: aborting due to 3 previous errors
92