diff options
Diffstat (limited to 'tests/ui/match/issue-26251.rs')
-rw-r--r-- | tests/ui/match/issue-26251.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/match/issue-26251.rs b/tests/ui/match/issue-26251.rs new file mode 100644 index 000000000..a3e26a412 --- /dev/null +++ b/tests/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"); +} |