about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
authorEric Holk <ericholk@microsoft.com>2022-05-13 13:38:36 -0700
committerEric Holk <ericholk@microsoft.com>2022-05-19 16:23:27 -0700
commit577bf0f3542d7cd49967d24811dd58b94ab7ae19 (patch)
tree00809d2479fd0bc48a9326bfaae66d23f0d090a5 /src/test
parentab8c50f9648065d3f4d2423cfa39a9750d04823d (diff)
downloadrust-577bf0f3542d7cd49967d24811dd58b94ab7ae19.tar.gz
rust-577bf0f3542d7cd49967d24811dd58b94ab7ae19.zip
Further reduce test case
Thanks to @tmiasko for this one!
Diffstat (limited to 'src/test')
-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 => (),
+        _ => (),
+    };
 }