rust/tests/ui/error-codes/E0030-teach.rs
Deadbeef f8ca417559 reword error for invalid range patterns
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.
2025-12-02 18:28:05 +00:00

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
}
}