2017-01-10 22:13:53 +01:00
|
|
|
#![feature(exclusive_range_pattern)]
|
|
|
|
|
2015-06-30 08:53:50 -07:00
|
|
|
fn main() {
|
|
|
|
match 5 {
|
2018-05-28 19:42:11 -07:00
|
|
|
6 ..= 1 => { }
|
2023-02-27 17:43:39 +00:00
|
|
|
//~^ ERROR lower range bound must be less than or equal to upper
|
2015-06-30 08:53:50 -07:00
|
|
|
_ => { }
|
|
|
|
};
|
|
|
|
|
2017-01-10 22:13:53 +01:00
|
|
|
match 5 {
|
|
|
|
0 .. 0 => { }
|
2023-02-27 17:43:39 +00:00
|
|
|
//~^ ERROR lower range bound must be less than upper
|
2017-01-10 22:13:53 +01:00
|
|
|
_ => { }
|
|
|
|
};
|
|
|
|
|
2015-06-30 08:53:50 -07:00
|
|
|
match 5u64 {
|
2018-05-28 19:42:11 -07:00
|
|
|
0xFFFF_FFFF_FFFF_FFFF ..= 1 => { }
|
2023-02-27 17:43:39 +00:00
|
|
|
//~^ ERROR lower range bound must be less than or equal to upper
|
2015-06-30 08:53:50 -07:00
|
|
|
_ => { }
|
|
|
|
};
|
|
|
|
}
|