]> git.lizzy.rs Git - rust.git/blob - src/test/ui/generator/drop-tracking-parent-expression.stderr
Auto merge of #98051 - davidtwco:split-dwarf-stabilization, r=wesleywiser
[rust.git] / src / test / ui / generator / drop-tracking-parent-expression.stderr
1 error: generator cannot be sent between threads safely
2   --> $DIR/drop-tracking-parent-expression.rs:24:25
3    |
4 LL |               assert_send(g);
5    |                           ^ generator is not `Send`
6 ...
7 LL | /     type_combinations!(
8 LL | |         // OK
9 LL | |         copy => { #[derive(Copy, Clone, Default)] pub struct Client; };
10 LL | |         // NOT OK: MIR borrowck thinks that this is used after the yield, even though
11 ...  |
12 LL | |         };
13 LL | |     );
14    | |_____- in this macro invocation
15    |
16    = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:18:21: 18:28]`, the trait `Send` is not implemented for `derived_drop::Client`
17 note: generator is not `Send` as this value is used across a yield
18   --> $DIR/drop-tracking-parent-expression.rs:22:22
19    |
20 LL |               let g = move || match drop($name::Client { ..$name::Client::default() }) {
21    |                                                            ------------------------ has type `derived_drop::Client` which is not `Send`
22 ...
23 LL |                   _ => yield,
24    |                        ^^^^^ yield occurs here, with `$name::Client::default()` maybe used later
25 LL |               };
26    |               - `$name::Client::default()` is later dropped here
27 ...
28 LL | /     type_combinations!(
29 LL | |         // OK
30 LL | |         copy => { #[derive(Copy, Clone, Default)] pub struct Client; };
31 LL | |         // NOT OK: MIR borrowck thinks that this is used after the yield, even though
32 ...  |
33 LL | |         };
34 LL | |     );
35    | |_____- in this macro invocation
36 note: required by a bound in `assert_send`
37   --> $DIR/drop-tracking-parent-expression.rs:41:19
38    |
39 LL | fn assert_send<T: Send>(_thing: T) {}
40    |                   ^^^^ required by this bound in `assert_send`
41    = note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
42
43 error: generator cannot be sent between threads safely
44   --> $DIR/drop-tracking-parent-expression.rs:24:25
45    |
46 LL |               assert_send(g);
47    |                           ^ generator is not `Send`
48 ...
49 LL | /     type_combinations!(
50 LL | |         // OK
51 LL | |         copy => { #[derive(Copy, Clone, Default)] pub struct Client; };
52 LL | |         // NOT OK: MIR borrowck thinks that this is used after the yield, even though
53 ...  |
54 LL | |         };
55 LL | |     );
56    | |_____- in this macro invocation
57    |
58    = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:18:21: 18:28]`, the trait `Send` is not implemented for `significant_drop::Client`
59 note: generator is not `Send` as this value is used across a yield
60   --> $DIR/drop-tracking-parent-expression.rs:22:22
61    |
62 LL |               let g = move || match drop($name::Client { ..$name::Client::default() }) {
63    |                                                            ------------------------ has type `significant_drop::Client` which is not `Send`
64 ...
65 LL |                   _ => yield,
66    |                        ^^^^^ yield occurs here, with `$name::Client::default()` maybe used later
67 LL |               };
68    |               - `$name::Client::default()` is later dropped here
69 ...
70 LL | /     type_combinations!(
71 LL | |         // OK
72 LL | |         copy => { #[derive(Copy, Clone, Default)] pub struct Client; };
73 LL | |         // NOT OK: MIR borrowck thinks that this is used after the yield, even though
74 ...  |
75 LL | |         };
76 LL | |     );
77    | |_____- in this macro invocation
78 note: required by a bound in `assert_send`
79   --> $DIR/drop-tracking-parent-expression.rs:41:19
80    |
81 LL | fn assert_send<T: Send>(_thing: T) {}
82    |                   ^^^^ required by this bound in `assert_send`
83    = note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
84
85 error: generator cannot be sent between threads safely
86   --> $DIR/drop-tracking-parent-expression.rs:24:25
87    |
88 LL |               assert_send(g);
89    |                           ^ generator is not `Send`
90 ...
91 LL | /     type_combinations!(
92 LL | |         // OK
93 LL | |         copy => { #[derive(Copy, Clone, Default)] pub struct Client; };
94 LL | |         // NOT OK: MIR borrowck thinks that this is used after the yield, even though
95 ...  |
96 LL | |         };
97 LL | |     );
98    | |_____- in this macro invocation
99    |
100    = help: within `[generator@$DIR/drop-tracking-parent-expression.rs:18:21: 18:28]`, the trait `Send` is not implemented for `insignificant_dtor::Client`
101 note: generator is not `Send` as this value is used across a yield
102   --> $DIR/drop-tracking-parent-expression.rs:22:22
103    |
104 LL |               let g = move || match drop($name::Client { ..$name::Client::default() }) {
105    |                                                            ------------------------ has type `insignificant_dtor::Client` which is not `Send`
106 ...
107 LL |                   _ => yield,
108    |                        ^^^^^ yield occurs here, with `$name::Client::default()` maybe used later
109 LL |               };
110    |               - `$name::Client::default()` is later dropped here
111 ...
112 LL | /     type_combinations!(
113 LL | |         // OK
114 LL | |         copy => { #[derive(Copy, Clone, Default)] pub struct Client; };
115 LL | |         // NOT OK: MIR borrowck thinks that this is used after the yield, even though
116 ...  |
117 LL | |         };
118 LL | |     );
119    | |_____- in this macro invocation
120 note: required by a bound in `assert_send`
121   --> $DIR/drop-tracking-parent-expression.rs:41:19
122    |
123 LL | fn assert_send<T: Send>(_thing: T) {}
124    |                   ^^^^ required by this bound in `assert_send`
125    = note: this error originates in the macro `type_combinations` (in Nightly builds, run with -Z macro-backtrace for more info)
126
127 error: aborting due to 3 previous errors
128