Sorry about the long title :sweat_smile: Given the following code ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=867f7b4274789ddf7a82ce8154f1e428)): ```rust fn main() { let x: usize = 4; let y = Some(x); match x { 0 => (), 1..=usize::MAX => (), } match y { Some(0) => (), Some(1..=usize::MAX) => (), None => (), } } ``` The current output is: ``` error[E0004]: non-exhaustive patterns: `_` not covered --> src/main.rs:5:11 | 5 | match x { | ^ pattern `_` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms = note: the matched value is of type `usize` = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching error[E0004]: non-exhaustive patterns: `Some(_)` not covered --> src/main.rs:10:11 | 10 | match y { | ^ pattern `Some(_)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms = note: the matched value is of type `Option<usize>` ``` Note how the first diagnostic, emitted when matching on a `usize`, contains additional information about why this exhaustive match does not pass the exhaustiveness check. Ideally, this information should be added to the second diagnostic as well: ``` error[E0004]: non-exhaustive patterns: `Some(_)` not covered --> src/main.rs:10:11 | 10 | match y { | ^ pattern `Some(_)` not covered | = help: ensure that all possible cases are being handled, possibly by adding wildcards or more match arms = note: the matched value is of type `Option<usize>` = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching ``` @rustbot modify labels: +A-exhaustiveness-checking +A-patterns +D-terse