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 => { }
|
2015-06-30 15:53:50 +00:00
|
|
|
_ => { }
|
|
|
|
};
|
|
|
|
//~^^^ ERROR lower range bound must be less than or equal to upper
|
2020-01-08 17:02:10 +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 => { }
|
|
|
|
_ => { }
|
|
|
|
};
|
|
|
|
//~^^^ ERROR lower range bound must be less than upper
|
2020-01-08 17:02:10 +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 => { }
|
2015-06-30 15:53:50 +00:00
|
|
|
_ => { }
|
|
|
|
};
|
|
|
|
//~^^^ ERROR lower range bound must be less than or equal to upper
|
2020-01-08 17:02:10 +00:00
|
|
|
//~| ERROR lower range bound must be less than or equal to upper
|
2015-06-30 15:53:50 +00:00
|
|
|
}
|