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