Skip to content

Commit 42bb5ca

Browse files
committed
laptop cpu hates me
1 parent 633e59e commit 42bb5ca

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

compiler/rustc_mir_build/src/thir/pattern/check_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,7 @@ fn report_non_exhaustive_match<'p, 'tcx>(
12801280
));
12811281
} else if ty.inner() == cx.tcx.types.isize {
12821282
err.note(format!(
1283-
"The minimum and maximum values of `{ty}` are not directly accessible, so half-open \
1283+
"`{ty}::MIN` and `{ty}::MAX` are not accessible as fixed values, so half-open \
12841284
ranges are necessary to match exhaustively",
12851285
));
12861286
}

tests/ui/feature-gates/feature-gate-precise_pointer_size_matching.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ LL | match 0isize {
1919
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
2020
|
2121
= note: the matched value is of type `isize`
22-
= note: The minimum and maximum values of `isize` are not directly accessible, so half-open ranges are necessary to match exhaustively
22+
= note: `isize::MIN` and `isize::MAX` are not accessible as fixed values, so half-open ranges are necessary to match exhaustively
2323
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
2424
|
2525
LL ~ isize::MIN..=isize::MAX => {},

tests/ui/pattern/usefulness/integer-ranges/pointer-sized-int.deny.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ LL | match 0isize {
1919
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
2020
|
2121
= note: the matched value is of type `isize`
22-
= note: The minimum and maximum values of `isize` are not directly accessible, so half-open ranges are necessary to match exhaustively
22+
= note: `isize::MIN` and `isize::MAX` are not accessible as fixed values, so half-open ranges are necessary to match exhaustively
2323
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
2424
|
2525
LL ~ isize::MIN..=isize::MAX => {},
@@ -85,7 +85,7 @@ LL | m!(0isize, isize::MIN..=isize::MAX);
8585
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
8686
|
8787
= note: the matched value is of type `isize`
88-
= note: The minimum and maximum values of `isize` are not directly accessible, so half-open ranges are necessary to match exhaustively
88+
= note: `isize::MIN` and `isize::MAX` are not accessible as fixed values, so half-open ranges are necessary to match exhaustively
8989
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
9090
|
9191
LL | match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
@@ -98,7 +98,7 @@ LL | m!(0isize, isize::MIN..5 | 5..=isize::MAX);
9898
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
9999
|
100100
= note: the matched value is of type `isize`
101-
= note: The minimum and maximum values of `isize` are not directly accessible, so half-open ranges are necessary to match exhaustively
101+
= note: `isize::MIN` and `isize::MAX` are not accessible as fixed values, so half-open ranges are necessary to match exhaustively
102102
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
103103
|
104104
LL | match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
@@ -111,7 +111,7 @@ LL | m!(0isize, isize::MIN..=-1 | 0 | 1..=isize::MAX);
111111
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
112112
|
113113
= note: the matched value is of type `isize`
114-
= note: The minimum and maximum values of `isize` are not directly accessible, so half-open ranges are necessary to match exhaustively
114+
= note: `isize::MIN` and `isize::MAX` are not accessible as fixed values, so half-open ranges are necessary to match exhaustively
115115
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
116116
|
117117
LL | match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
@@ -124,7 +124,7 @@ LL | m!(0isize, isize::MIN..isize::MAX | isize::MAX);
124124
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
125125
|
126126
= note: the matched value is of type `isize`
127-
= note: The minimum and maximum values of `isize` are not directly accessible, so half-open ranges are necessary to match exhaustively
127+
= note: `isize::MIN` and `isize::MAX` are not accessible as fixed values, so half-open ranges are necessary to match exhaustively
128128
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
129129
|
130130
LL | match $s { $($t)+ => {}, ..isize::MIN | isize::MAX.. => todo!() }
@@ -137,7 +137,7 @@ LL | (0isize, true),
137137
| ^^^^^^^^^^^^^^ patterns `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
138138
|
139139
= note: the matched value is of type `(isize, bool)`
140-
= note: The minimum and maximum values of `isize` are not directly accessible, so half-open ranges are necessary to match exhaustively
140+
= note: `isize::MIN` and `isize::MAX` are not accessible as fixed values, so half-open ranges are necessary to match exhaustively
141141
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
142142
|
143143
LL | match $s { $($t)+ => {}, (..isize::MIN, _) | (isize::MAX.., _) => todo!() }

tests/ui/pattern/usefulness/integer-ranges/precise_pointer_matching-message.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ LL | match 0isize {
1919
| ^^^^^^ patterns `..isize::MIN` and `isize::MAX..` not covered
2020
|
2121
= note: the matched value is of type `isize`
22-
= note: The minimum and maximum values of `isize` are not directly accessible, so half-open ranges are necessary to match exhaustively
22+
= note: `isize::MIN` and `isize::MAX` are not accessible as fixed values, so half-open ranges are necessary to match exhaustively
2323
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
2424
|
2525
LL ~ isize::MIN..=isize::MAX => {},

tests/ui/pattern/usefulness/issue-85222-types-containing-non-exhaustive-types.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ LL | match (0isize, 0usize) {
3333
| ^^^^^^^^^^^^^^^^ patterns `(..isize::MIN, _)` and `(isize::MAX.., _)` not covered
3434
|
3535
= note: the matched value is of type `(isize, usize)`
36-
= note: The minimum and maximum values of `isize` are not directly accessible, so half-open ranges are necessary to match exhaustively
36+
= note: `isize::MIN` and `isize::MAX` are not accessible as fixed values, so half-open ranges are necessary to match exhaustively
3737
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
3838
|
3939
LL ~ (isize::MIN..=isize::MAX, 1..=usize::MAX) => (),
@@ -131,7 +131,7 @@ note: `B<isize, usize>` defined here
131131
LL | struct B<T, U>(T, U);
132132
| ^
133133
= note: the matched value is of type `B<isize, usize>`
134-
= note: The minimum and maximum values of `isize` are not directly accessible, so half-open ranges are necessary to match exhaustively
134+
= note: `isize::MIN` and `isize::MAX` are not accessible as fixed values, so half-open ranges are necessary to match exhaustively
135135
help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms
136136
|
137137
LL ~ B(isize::MIN..=isize::MAX, 1..=usize::MAX) => (),

0 commit comments

Comments
 (0)