1 error: generator cannot be sent between threads safely
2 --> $DIR/partial-drop.rs:17:17
7 LL | | let guard = Bar { foo: Foo, x: 42 };
8 LL | | drop(guard.foo);
11 | |_____^ generator is not `Send`
13 = help: within `[generator@$DIR/partial-drop.rs:17:17: 17:19]`, the trait `Send` is not implemented for `Foo`
14 note: generator is not `Send` as this value is used across a yield
15 --> $DIR/partial-drop.rs:21:9
17 LL | let guard = Bar { foo: Foo, x: 42 };
18 | ----- has type `Bar` which is not `Send`
21 | ^^^^^ yield occurs here, with `guard` maybe used later
23 | - `guard` is later dropped here
24 note: required by a bound in `assert_send`
25 --> $DIR/partial-drop.rs:33:19
27 LL | fn assert_send<T: Send>(_: T) {}
28 | ^^^^ required by this bound in `assert_send`
30 error: generator cannot be sent between threads safely
31 --> $DIR/partial-drop.rs:24:17
36 LL | | let guard = Bar { foo: Foo, x: 42 };
37 LL | | let Bar { foo, x } = guard;
41 | |_____^ generator is not `Send`
43 = help: within `[generator@$DIR/partial-drop.rs:24:17: 24:19]`, the trait `Send` is not implemented for `Foo`
44 note: generator is not `Send` as this value is used across a yield
45 --> $DIR/partial-drop.rs:29:9
47 LL | let Bar { foo, x } = guard;
48 | --- has type `Foo` which is not `Send`
51 | ^^^^^ yield occurs here, with `foo` maybe used later
53 | - `foo` is later dropped here
54 note: required by a bound in `assert_send`
55 --> $DIR/partial-drop.rs:33:19
57 LL | fn assert_send<T: Send>(_: T) {}
58 | ^^^^ required by this bound in `assert_send`
60 error: aborting due to 2 previous errors