summaryrefslogtreecommitdiffstats
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.rs34
1 files changed, 0 insertions, 34 deletions
diff --git a/tests/ui/generator/partial-drop.rs b/tests/ui/generator/partial-drop.rs
deleted file mode 100644
index 868f36adc..000000000
--- a/tests/ui/generator/partial-drop.rs
+++ /dev/null
@@ -1,34 +0,0 @@
-// check-pass
-#![feature(negative_impls, generators)]
-
-struct Foo;
-impl !Send for Foo {}
-
-struct Bar {
- foo: Foo,
- x: i32,
-}
-
-fn main() {
- assert_send(|| {
- let guard = Bar { foo: Foo, x: 42 };
- drop(guard.foo);
- yield;
- });
-
- assert_send(|| {
- let mut guard = Bar { foo: Foo, x: 42 };
- drop(guard);
- guard = Bar { foo: Foo, x: 23 };
- yield;
- });
-
- assert_send(|| {
- let guard = Bar { foo: Foo, x: 42 };
- let Bar { foo, x } = guard;
- drop(foo);
- yield;
- });
-}
-
-fn assert_send<T: Send>(_: T) {}