2018-08-30 07:18:55 -05:00
|
|
|
// run-pass
|
2020-10-22 12:34:00 -05:00
|
|
|
#![allow(overlapping_range_endpoints)]
|
2019-10-06 23:47:01 -05:00
|
|
|
|
2016-08-27 17:37:27 -05:00
|
|
|
fn main() {
|
|
|
|
let x = 'a';
|
|
|
|
|
|
|
|
let y = match x {
|
2018-05-28 21:42:11 -05:00
|
|
|
'a'..='b' if false => "one",
|
2016-08-27 17:37:27 -05:00
|
|
|
'a' => "two",
|
2018-05-28 21:42:11 -05:00
|
|
|
'a'..='b' => "three",
|
2016-08-27 17:37:27 -05:00
|
|
|
_ => panic!("what?"),
|
|
|
|
};
|
|
|
|
|
|
|
|
assert_eq!(y, "two");
|
|
|
|
}
|