]> git.lizzy.rs Git - rust.git/blob - src/test/ui/pattern/usefulness/non-exhaustive-pattern-pointer-size-int.rs
Add test for eval order for a+=b
[rust.git] / src / test / ui / pattern / usefulness / non-exhaustive-pattern-pointer-size-int.rs
1 use std::{usize, isize};
2
3 fn main() {
4     match 0usize {
5         //~^ ERROR non-exhaustive patterns
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
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
20     match 7usize {}
21     //~^ ERROR non-exhaustive patterns
22     //~| NOTE the matched value is of type `usize`
23 }