2017-01-10 21:13:53 +00:00
|
|
|
#![feature(exclusive_range_pattern)]
|
|
|
|
|
2015-06-30 15:53:50 +00:00
|
|
|
fn main() {
|
|
|
|
match 5 {
|
2018-05-29 02:42:11 +00: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 15:53:50 +00:00
|
|
|
_ => { }
|
|
|
|
};
|
|
|
|
|
2017-01-10 21:13:53 +00: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 21:13:53 +00:00
|
|
|
_ => { }
|
|
|
|
};
|
|
|
|
|
2015-06-30 15:53:50 +00:00
|
|
|
match 5u64 {
|
2018-05-29 02:42:11 +00: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 15:53:50 +00:00
|
|
|
_ => { }
|
|
|
|
};
|
|
|
|
}
|