Skip to content

Commit 577bf0f

Browse files
committed
Further reduce test case
Thanks to @tmiasko for this one!
1 parent ab8c50f commit 577bf0f

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

src/test/ui/generator/drop-tracking-yielding-in-match-guards.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,11 @@
1111
// Thus, `&'_ u8` should be included in type signature
1212
// of the underlying generator.
1313

14-
async fn f() -> u8 { 1 }
15-
16-
async fn i(x: u8) {
17-
match x {
18-
y if f().await == y + 1 => (),
19-
_ => (),
20-
}
21-
}
14+
#![feature(generators)]
2215

2316
fn main() {
24-
let _ = i(8);
17+
let _ = static |x: u8| match x {
18+
y if { yield } == y + 1 => (),
19+
_ => (),
20+
};
2521
}

0 commit comments

Comments
 (0)