]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.rs
Rollup merge of #78853 - calebcartwright:fix-const-block-expr-span, r=spastorino
[rust.git] / src / test / ui / pattern / usefulness / integer-ranges / precise_pointer_matching-message.rs
1 // This tests that the lint message explains the reason for the error.
2 fn main() {
3     match 0usize {
4         //~^ ERROR non-exhaustive patterns: `_` not covered
5         //~| NOTE pattern `_` not covered
6         //~| NOTE the matched value is of type `usize`
7         //~| NOTE `usize` does not have a fixed maximum value
8         0..=usize::MAX => {}
9     }
10
11     match 0isize {
12         //~^ ERROR non-exhaustive patterns: `_` not covered
13         //~| NOTE pattern `_` not covered
14         //~| NOTE the matched value is of type `isize`
15         //~| NOTE `isize` does not have a fixed maximum value
16         isize::MIN..=isize::MAX => {}
17     }
18 }