Closed
Description
fn main() {
match 0i32 {
1 => {} //~ ERROR
}
}
Once exhaustive integer matching has been stabilised, we'll be getting errors like this:
error[E0004]: non-exhaustive patterns: `-2147483648i32..=0i32` and `2i32..=2147483647i32` not covered
--> src/main.rs:5:11
|
5 | match 0i32 {
| ^^^^ patterns `-2147483648i32..=0i32` and `2i32..=2147483647i32` not covered
It would be nicer to display these as ::std::i32::MIN
(or ::core
, etc.) instead (or provide a hint telling the user this).
See https://github.com/rust-lang/rust/pull/56362/files/4fc5758a67e38b21e975fc9efe071dd58f4b98c6#diff-1d41dba9e92e851833cbeb40c504a40b for instance, where we display -2147483648i32
rather than ::std::i32::MIN
.