diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/generator/partial-drop.drop_tracking.stderr (renamed from tests/ui/generator/partial-drop.stderr) | 51 |
1 files changed, 10 insertions, 41 deletions
diff --git a/tests/ui/generator/partial-drop.stderr b/tests/ui/generator/partial-drop.drop_tracking.stderr index 9baafe54e..f1b25cb8c 100644 --- a/tests/ui/generator/partial-drop.stderr +++ b/tests/ui/generator/partial-drop.drop_tracking.stderr @@ -1,19 +1,18 @@ error: generator cannot be sent between threads safely - --> $DIR/partial-drop.rs:14:17 + --> $DIR/partial-drop.rs:17:17 | LL | assert_send(|| { | _________________^ LL | | -LL | | // FIXME: it would be nice to make this work. LL | | let guard = Bar { foo: Foo, x: 42 }; LL | | drop(guard.foo); LL | | yield; LL | | }); | |_____^ generator is not `Send` | - = help: within `[generator@$DIR/partial-drop.rs:14:17: 14:19]`, the trait `Send` is not implemented for `Foo` + = help: within `[generator@$DIR/partial-drop.rs:17:17: 17:19]`, the trait `Send` is not implemented for `Foo` note: generator is not `Send` as this value is used across a yield - --> $DIR/partial-drop.rs:19:9 + --> $DIR/partial-drop.rs:21:9 | LL | let guard = Bar { foo: Foo, x: 42 }; | ----- has type `Bar` which is not `Send` @@ -23,25 +22,25 @@ LL | yield; LL | }); | - `guard` is later dropped here note: required by a bound in `assert_send` - --> $DIR/partial-drop.rs:42:19 + --> $DIR/partial-drop.rs:33:19 | LL | fn assert_send<T: Send>(_: T) {} | ^^^^ required by this bound in `assert_send` error: generator cannot be sent between threads safely - --> $DIR/partial-drop.rs:22:17 + --> $DIR/partial-drop.rs:24:17 | LL | assert_send(|| { | _________________^ LL | | -LL | | // FIXME: it would be nice to make this work. LL | | let guard = Bar { foo: Foo, x: 42 }; -... | +LL | | let Bar { foo, x } = guard; +LL | | drop(foo); LL | | yield; LL | | }); | |_____^ generator is not `Send` | - = help: within `[generator@$DIR/partial-drop.rs:22:17: 22:19]`, the trait `Send` is not implemented for `Foo` + = help: within `[generator@$DIR/partial-drop.rs:24:17: 24:19]`, the trait `Send` is not implemented for `Foo` note: generator is not `Send` as this value is used across a yield --> $DIR/partial-drop.rs:29:9 | @@ -53,40 +52,10 @@ LL | yield; LL | }); | - `guard` is later dropped here note: required by a bound in `assert_send` - --> $DIR/partial-drop.rs:42:19 + --> $DIR/partial-drop.rs:33:19 | LL | fn assert_send<T: Send>(_: T) {} | ^^^^ required by this bound in `assert_send` -error: generator cannot be sent between threads safely - --> $DIR/partial-drop.rs:32:17 - | -LL | assert_send(|| { - | _________________^ -LL | | -LL | | // FIXME: it would be nice to make this work. -LL | | let guard = Bar { foo: Foo, x: 42 }; -... | -LL | | yield; -LL | | }); - | |_____^ generator is not `Send` - | - = help: within `[generator@$DIR/partial-drop.rs:32:17: 32:19]`, the trait `Send` is not implemented for `Foo` -note: generator is not `Send` as this value is used across a yield - --> $DIR/partial-drop.rs:38:9 - | -LL | let guard = Bar { foo: Foo, x: 42 }; - | ----- has type `Bar` which is not `Send` -... -LL | yield; - | ^^^^^ yield occurs here, with `guard` maybe used later -LL | }); - | - `guard` is later dropped here -note: required by a bound in `assert_send` - --> $DIR/partial-drop.rs:42:19 - | -LL | fn assert_send<T: Send>(_: T) {} - | ^^^^ required by this bound in `assert_send` - -error: aborting due to 3 previous errors +error: aborting due to 2 previous errors |