Code
fn main() {
match 1 {
..i32::MIN => {}
_ => {}
};
}
Current output
error[E0579]: lower range bound must be less than upper
--> src/main.rs:3:9
|
3 | ..i32::MIN => {}
| ^^^^^^^^^^
For more information about this error, try `rustc --explain E0579`.
Desired output
Rationale and extra context
The error refers to a nonexistent "lower range bound".
This error also occurs with f64::NEG_INFINITY and '\0'
While we're at it, it would be nice if the error clearly said that this prohibition applies only to range patterns, not range expressions.
Other cases
Rust Version
Reproducible on the playground with version 1.93.0-nightly (2025-11-20 53732d5e076329a62f71)
Anything else?
No response
Code
Current output
Desired output
Rationale and extra context
The error refers to a nonexistent "lower range bound".
This error also occurs with
f64::NEG_INFINITYand'\0'While we're at it, it would be nice if the error clearly said that this prohibition applies only to range patterns, not range expressions.
Other cases
Rust Version
Anything else?
No response