rust/tests/ui/match/issue-26251.rs
2024-02-16 20:02:50 +00:00

16 lines
260 B
Rust

//@ 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");
}