]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/generator/yielding-in-match-guards.rs
Update unsuspicious file list
[rustc.git] / src / test / ui / generator / yielding-in-match-guards.rs
index c76726414df8abb27752ac058572bd0655cb0fee..4e89fc975d04c95a1dde7a892cedcfd3f146e0c0 100644 (file)
@@ -10,6 +10,8 @@
 // Thus, `&'_ u8` should be included in type signature
 // of the underlying generator.
 
+#![feature(if_let_guard)]
+
 async fn f() -> u8 { 1 }
 async fn foo() -> [bool; 10] { [false; 10] }
 
@@ -36,8 +38,16 @@ async fn i(x: u8) {
     }
 }
 
+async fn j(x: u8) {
+    match x {
+        y if let (1, 42) = (f().await, y) => (),
+        _ => (),
+    }
+}
+
 fn main() {
     let _ = g(10);
     let _ = h(9);
     let _ = i(8);
+    let _ = j(7);
 }