about summary refs log tree commit diff
path: root/tests/ui/try-block/try-block-in-match.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/try-block/try-block-in-match.rs')
-rw-r--r--tests/ui/try-block/try-block-in-match.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/ui/try-block/try-block-in-match.rs b/tests/ui/try-block/try-block-in-match.rs
new file mode 100644
index 00000000000..cd0b967e79d
--- /dev/null
+++ b/tests/ui/try-block/try-block-in-match.rs
@@ -0,0 +1,11 @@
+// run-pass
+// compile-flags: --edition 2018
+
+#![feature(try_blocks)]
+
+fn main() {
+    match try { } {
+        Err(()) => (),
+        Ok(()) => (),
+    }
+}