mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 14:52:56 +03:00
f8ca417559
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.
7 lines
153 B
Rust
7 lines
153 B
Rust
fn main() {
|
|
match 5u32 {
|
|
1000 ..= 5 => {}
|
|
//~^ ERROR lower bound for range pattern must be less than or equal to upper bound
|
|
}
|
|
}
|