about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/ui/generator/drop-tracking-yielding-in-match-guards.rs14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/test/ui/generator/drop-tracking-yielding-in-match-guards.rs b/src/test/ui/generator/drop-tracking-yielding-in-match-guards.rs
index e6206249d91..c818963e466 100644
--- a/src/test/ui/generator/drop-tracking-yielding-in-match-guards.rs
+++ b/src/test/ui/generator/drop-tracking-yielding-in-match-guards.rs
@@ -11,15 +11,11 @@
 // Thus, `&'_ u8` should be included in type signature
 // of the underlying generator.
 
-async fn f() -> u8 { 1 }
-
-async fn i(x: u8) {
-    match x {
-        y if f().await == y + 1 => (),
-        _ => (),
-    }
-}
+#![feature(generators)]
 
 fn main() {
-    let _ = i(8);
+    let _ = static |x: u8| match x {
+        y if { yield } == y + 1 => (),
+        _ => (),
+    };
 }