about summary refs log tree commit diff
path: root/tests/ui/generator/partial-drop.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/generator/partial-drop.rs')
-rw-r--r--tests/ui/generator/partial-drop.rs14
1 files changed, 3 insertions, 11 deletions
diff --git a/tests/ui/generator/partial-drop.rs b/tests/ui/generator/partial-drop.rs
index c872fb7f3e6..868f36adce2 100644
--- a/tests/ui/generator/partial-drop.rs
+++ b/tests/ui/generator/partial-drop.rs
@@ -1,5 +1,4 @@
-// compile-flags: -Zdrop-tracking
-
+// check-pass
 #![feature(negative_impls, generators)]
 
 struct Foo;
@@ -12,26 +11,19 @@ struct Bar {
 
 fn main() {
     assert_send(|| {
-        //~^ ERROR generator cannot be sent between threads safely
-        // FIXME: it would be nice to make this work.
         let guard = Bar { foo: Foo, x: 42 };
         drop(guard.foo);
         yield;
     });
 
     assert_send(|| {
-        //~^ ERROR generator cannot be sent between threads safely
-        // FIXME: it would be nice to make this work.
-        let guard = Bar { foo: Foo, x: 42 };
+        let mut guard = Bar { foo: Foo, x: 42 };
         drop(guard);
-        guard.foo = Foo;
-        guard.x = 23;
+        guard = Bar { foo: Foo, x: 23 };
         yield;
     });
 
     assert_send(|| {
-        //~^ ERROR generator cannot be sent between threads safely
-        // FIXME: it would be nice to make this work.
         let guard = Bar { foo: Foo, x: 42 };
         let Bar { foo, x } = guard;
         drop(foo);