]> git.lizzy.rs Git - rust.git/blob - tests/ui/match/match-range-fail-2.rs
Auto merge of #106458 - albertlarsan68:move-tests, r=jyn514
[rust.git] / tests / ui / match / match-range-fail-2.rs
1 #![feature(exclusive_range_pattern)]
2
3 fn main() {
4     match 5 {
5         6 ..= 1 => { }
6         _ => { }
7     };
8     //~^^^ ERROR lower range bound must be less than or equal to upper
9     //~| ERROR lower range bound must be less than or equal to upper
10
11     match 5 {
12         0 .. 0 => { }
13         _ => { }
14     };
15     //~^^^ ERROR lower range bound must be less than upper
16     //~| ERROR lower range bound must be less than upper
17
18     match 5u64 {
19         0xFFFF_FFFF_FFFF_FFFF ..= 1 => { }
20         _ => { }
21     };
22     //~^^^ ERROR lower range bound must be less than or equal to upper
23     //~| ERROR lower range bound must be less than or equal to upper
24 }