rust/tests/ui/match/match-range-fail-2.rs
2023-04-03 15:59:21 +00:00

22 lines
466 B
Rust

#![feature(exclusive_range_pattern)]
fn main() {
match 5 {
6 ..= 1 => { }
//~^ ERROR lower range bound must be less than or equal to upper
_ => { }
};
match 5 {
0 .. 0 => { }
//~^ ERROR lower range bound must be less than upper
_ => { }
};
match 5u64 {
0xFFFF_FFFF_FFFF_FFFF ..= 1 => { }
//~^ ERROR lower range bound must be less than or equal to upper
_ => { }
};
}