1
1
error[E0004]: non-exhaustive patterns: `_` not covered
2
- --> $DIR/pointer-sized-int.rs:12 :11
2
+ --> $DIR/pointer-sized-int.rs:14 :11
3
3
|
4
4
LL | match 0usize {
5
5
| ^^^^^^ pattern `_` not covered
@@ -14,7 +14,7 @@ LL + _ => todo!()
14
14
|
15
15
16
16
error[E0004]: non-exhaustive patterns: `_` not covered
17
- --> $DIR/pointer-sized-int.rs:17 :11
17
+ --> $DIR/pointer-sized-int.rs:19 :11
18
18
|
19
19
LL | match 0isize {
20
20
| ^^^^^^ pattern `_` not covered
@@ -29,7 +29,21 @@ LL + _ => todo!()
29
29
|
30
30
31
31
error[E0004]: non-exhaustive patterns: `_` not covered
32
- --> $DIR/pointer-sized-int.rs:22:8
32
+ --> $DIR/pointer-sized-int.rs:24:8
33
+ |
34
+ LL | m!(0usize, 0..);
35
+ | ^^^^^^ pattern `_` not covered
36
+ |
37
+ = note: the matched value is of type `usize`
38
+ = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
39
+ = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
40
+ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
41
+ |
42
+ LL | match $s { $($t)+ => {}, _ => todo!() }
43
+ | ++++++++++++++
44
+
45
+ error[E0004]: non-exhaustive patterns: `_` not covered
46
+ --> $DIR/pointer-sized-int.rs:26:8
33
47
|
34
48
LL | m!(0usize, 0..=usize::MAX);
35
49
| ^^^^^^ pattern `_` not covered
@@ -43,7 +57,7 @@ LL | match $s { $($t)+ => {}, _ => todo!() }
43
57
| ++++++++++++++
44
58
45
59
error[E0004]: non-exhaustive patterns: `_` not covered
46
- --> $DIR/pointer-sized-int.rs:24 :8
60
+ --> $DIR/pointer-sized-int.rs:28 :8
47
61
|
48
62
LL | m!(0usize, 0..5 | 5..=usize::MAX);
49
63
| ^^^^^^ pattern `_` not covered
@@ -57,7 +71,7 @@ LL | match $s { $($t)+ => {}, _ => todo!() }
57
71
| ++++++++++++++
58
72
59
73
error[E0004]: non-exhaustive patterns: `_` not covered
60
- --> $DIR/pointer-sized-int.rs:26 :8
74
+ --> $DIR/pointer-sized-int.rs:30 :8
61
75
|
62
76
LL | m!(0usize, 0..usize::MAX | usize::MAX);
63
77
| ^^^^^^ pattern `_` not covered
@@ -71,7 +85,7 @@ LL | match $s { $($t)+ => {}, _ => todo!() }
71
85
| ++++++++++++++
72
86
73
87
error[E0004]: non-exhaustive patterns: `(_, _)` not covered
74
- --> $DIR/pointer-sized-int.rs:28 :8
88
+ --> $DIR/pointer-sized-int.rs:32 :8
75
89
|
76
90
LL | m!((0usize, true), (0..5, true) | (5..=usize::MAX, true) | (0..=usize::MAX, false));
77
91
| ^^^^^^^^^^^^^^ pattern `(_, _)` not covered
@@ -85,7 +99,35 @@ LL | match $s { $($t)+ => {}, (_, _) => todo!() }
85
99
| +++++++++++++++++++
86
100
87
101
error[E0004]: non-exhaustive patterns: `_` not covered
88
- --> $DIR/pointer-sized-int.rs:31:8
102
+ --> $DIR/pointer-sized-int.rs:34:8
103
+ |
104
+ LL | m!(0usize, 0..=usize::MAX | usize::MAX..);
105
+ | ^^^^^^ pattern `_` not covered
106
+ |
107
+ = note: the matched value is of type `usize`
108
+ = note: `usize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
109
+ = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `usize` matching
110
+ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
111
+ |
112
+ LL | match $s { $($t)+ => {}, _ => todo!() }
113
+ | ++++++++++++++
114
+
115
+ error[E0004]: non-exhaustive patterns: `_` not covered
116
+ --> $DIR/pointer-sized-int.rs:37:8
117
+ |
118
+ LL | m!(0isize, ..0 | 0..);
119
+ | ^^^^^^ pattern `_` not covered
120
+ |
121
+ = note: the matched value is of type `isize`
122
+ = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
123
+ = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
124
+ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
125
+ |
126
+ LL | match $s { $($t)+ => {}, _ => todo!() }
127
+ | ++++++++++++++
128
+
129
+ error[E0004]: non-exhaustive patterns: `_` not covered
130
+ --> $DIR/pointer-sized-int.rs:39:8
89
131
|
90
132
LL | m!(0isize, isize::MIN..=isize::MAX);
91
133
| ^^^^^^ pattern `_` not covered
@@ -99,7 +141,7 @@ LL | match $s { $($t)+ => {}, _ => todo!() }
99
141
| ++++++++++++++
100
142
101
143
error[E0004]: non-exhaustive patterns: `_` not covered
102
- --> $DIR/pointer-sized-int.rs:33 :8
144
+ --> $DIR/pointer-sized-int.rs:41 :8
103
145
|
104
146
LL | m!(0isize, isize::MIN..5 | 5..=isize::MAX);
105
147
| ^^^^^^ pattern `_` not covered
@@ -113,7 +155,7 @@ LL | match $s { $($t)+ => {}, _ => todo!() }
113
155
| ++++++++++++++
114
156
115
157
error[E0004]: non-exhaustive patterns: `_` not covered
116
- --> $DIR/pointer-sized-int.rs:35 :8
158
+ --> $DIR/pointer-sized-int.rs:43 :8
117
159
|
118
160
LL | m!(0isize, isize::MIN..isize::MAX | isize::MAX);
119
161
| ^^^^^^ pattern `_` not covered
@@ -127,7 +169,7 @@ LL | match $s { $($t)+ => {}, _ => todo!() }
127
169
| ++++++++++++++
128
170
129
171
error[E0004]: non-exhaustive patterns: `(_, _)` not covered
130
- --> $DIR/pointer-sized-int.rs:37 :8
172
+ --> $DIR/pointer-sized-int.rs:45 :8
131
173
|
132
174
LL | m!((0isize, true), (isize::MIN..5, true)
133
175
| ^^^^^^^^^^^^^^ pattern `(_, _)` not covered
@@ -141,7 +183,21 @@ LL | match $s { $($t)+ => {}, (_, _) => todo!() }
141
183
| +++++++++++++++++++
142
184
143
185
error[E0004]: non-exhaustive patterns: `_` not covered
144
- --> $DIR/pointer-sized-int.rs:41:11
186
+ --> $DIR/pointer-sized-int.rs:48:8
187
+ |
188
+ LL | m!(0isize, ..=isize::MIN | isize::MIN..=isize::MAX | isize::MAX..);
189
+ | ^^^^^^ pattern `_` not covered
190
+ |
191
+ = note: the matched value is of type `isize`
192
+ = note: `isize` does not have a fixed maximum value, so a wildcard `_` is necessary to match exhaustively
193
+ = help: add `#![feature(precise_pointer_size_matching)]` to the crate attributes to enable precise `isize` matching
194
+ help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown
195
+ |
196
+ LL | match $s { $($t)+ => {}, _ => todo!() }
197
+ | ++++++++++++++
198
+
199
+ error[E0004]: non-exhaustive patterns: `_` not covered
200
+ --> $DIR/pointer-sized-int.rs:51:11
145
201
|
146
202
LL | match 0isize {
147
203
| ^^^^^^ pattern `_` not covered
@@ -156,7 +212,7 @@ LL + _ => todo!()
156
212
|
157
213
158
214
error[E0004]: non-exhaustive patterns: type `usize` is non-empty
159
- --> $DIR/pointer-sized-int.rs:48 :11
215
+ --> $DIR/pointer-sized-int.rs:58 :11
160
216
|
161
217
LL | match 7usize {}
162
218
| ^^^^^^
@@ -169,6 +225,6 @@ LL + _ => todo!(),
169
225
LL + }
170
226
|
171
227
172
- error: aborting due to 12 previous errors
228
+ error: aborting due to 16 previous errors
173
229
174
230
For more information about this error, try `rustc --explain E0004`.
0 commit comments