summaryrefslogtreecommitdiffstats
path: root/tests/ui/binding/match-bot-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/binding/match-bot-2.rs')
-rw-r--r--tests/ui/binding/match-bot-2.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/ui/binding/match-bot-2.rs b/tests/ui/binding/match-bot-2.rs
new file mode 100644
index 000000000..95b3406f0
--- /dev/null
+++ b/tests/ui/binding/match-bot-2.rs
@@ -0,0 +1,6 @@
+// run-pass
+#![allow(unreachable_code)]
+// n.b. This was only ever failing with optimization disabled.
+
+fn a() -> isize { match return 1 { 2 => 3, _ => panic!() } }
+pub fn main() { a(); }