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.rs21
1 files changed, 15 insertions, 6 deletions
diff --git a/tests/ui/generator/partial-drop.rs b/tests/ui/generator/partial-drop.rs
index 1d3ae075d43..c872fb7f3e6 100644
--- a/tests/ui/generator/partial-drop.rs
+++ b/tests/ui/generator/partial-drop.rs
@@ -1,7 +1,4 @@
-// revisions: no_drop_tracking drop_tracking drop_tracking_mir
-// [drop_tracking] compile-flags: -Zdrop-tracking
-// [drop_tracking_mir] compile-flags: -Zdrop-tracking-mir
-// [drop_tracking_mir] check-pass
+// compile-flags: -Zdrop-tracking
 
 #![feature(negative_impls, generators)]
 
@@ -15,14 +12,26 @@ struct Bar {
 
 fn main() {
     assert_send(|| {
-        //[no_drop_tracking,drop_tracking]~^ ERROR generator cannot be sent between threads safely
+        //~^ 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(|| {
-        //[no_drop_tracking,drop_tracking]~^ ERROR generator cannot be sent between threads safely
+        //~^ 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);
+        guard.foo = Foo;
+        guard.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);