summaryrefslogtreecommitdiffstats
path: root/src/test/ui/match/issue-26251.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/match/issue-26251.rs')
-rw-r--r--src/test/ui/match/issue-26251.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/match/issue-26251.rs b/src/test/ui/match/issue-26251.rs
new file mode 100644
index 000000000..a3e26a412
--- /dev/null
+++ b/src/test/ui/match/issue-26251.rs
@@ -0,0 +1,15 @@
+// run-pass
+#![allow(overlapping_range_endpoints)]
+
+fn main() {
+ let x = 'a';
+
+ let y = match x {
+ 'a'..='b' if false => "one",
+ 'a' => "two",
+ 'a'..='b' => "three",
+ _ => panic!("what?"),
+ };
+
+ assert_eq!(y, "two");
+}