mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
16 lines
259 B
Rust
16 lines
259 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");
|
|
}
|