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