]> git.lizzy.rs Git - rust.git/blob - src/test/ui/feature-gates/feature-gate-precise_pointer_size_matching.rs
Rollup merge of #79293 - Havvy:test-eval-order-compound-assign, r=Mark-Simulacrum
[rust.git] / src / test / ui / feature-gates / feature-gate-precise_pointer_size_matching.rs
1 use std::{isize, usize};
2
3 fn main() {
4     match 0usize {
5         //~^ ERROR non-exhaustive patterns: `_` not covered
6         //~| NOTE pattern `_` not covered
7         //~| NOTE the matched value is of type `usize`
8         //~| NOTE `usize` does not have a fixed maximum value
9         0..=usize::MAX => {}
10     }
11
12     match 0isize {
13         //~^ ERROR non-exhaustive patterns: `_` not covered
14         //~| NOTE pattern `_` not covered
15         //~| NOTE the matched value is of type `isize`
16         //~| NOTE `isize` does not have a fixed maximum value
17         isize::MIN..=isize::MAX => {}
18     }
19 }