For half-open ranges, specifies that the upper bound cannot be the minimum. Also specify that this only applies to range patterns and not also expressions.
8 lines
182 B
Rust
8 lines
182 B
Rust
//@ compile-flags: -Z teach
|
|
|
|
fn main() {
|
|
match 5u32 {
|
|
1000 ..= 5 => {}
|
|
//~^ ERROR lower bound for range pattern must be less than or equal to upper bound
|
|
}
|
|
}
|