]> git.proxmox.com Git - rustc.git/blobdiff - src/test/ui/try-block/try-block-in-match.rs
New upstream version 1.44.1+dfsg1
[rustc.git] / src / test / ui / try-block / try-block-in-match.rs
index bce0d0340b65859cb296225fda9295fcd437b81d..cd0b967e79d07bcca6c1a8aca9fed4506aba433d 100644 (file)
@@ -1,7 +1,11 @@
+// run-pass
 // compile-flags: --edition 2018
 
 #![feature(try_blocks)]
 
 fn main() {
-    match try { false } { _ => {} } //~ ERROR expected expression, found reserved keyword `try`
+    match try { } {
+        Err(()) => (),
+        Ok(()) => (),
+    }
 }