summaryrefslogtreecommitdiffstats
path: root/src/test/ui/try-block/try-block-in-match.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/try-block/try-block-in-match.rs')
-rw-r--r--src/test/ui/try-block/try-block-in-match.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/ui/try-block/try-block-in-match.rs b/src/test/ui/try-block/try-block-in-match.rs
new file mode 100644
index 000000000..cd0b967e7
--- /dev/null
+++ b/src/test/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(()) => (),
+ }
+}