diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-13 20:01:57 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-13 20:01:57 +0100 |
| commit | 5c2aa6dc6f78ce8cd65dd526ed8a84d2be425c1e (patch) | |
| tree | 72f8f799f20c847a80cf005fe3fa191ed26abaf5 /tests/ui/pattern | |
| parent | b3376bb92f32c82021e718f98239b3719acf6900 (diff) | |
| parent | c4236785c72fdf04176716393c910b1fb011d15f (diff) | |
| download | rust-5c2aa6dc6f78ce8cd65dd526ed8a84d2be425c1e.tar.gz rust-5c2aa6dc6f78ce8cd65dd526ed8a84d2be425c1e.zip | |
Rollup merge of #122437 - Nadrieril:no-after-max, r=compiler-errors
pattern analysis: remove `MaybeInfiniteInt::JustAfterMax` It was inherited from before half-open ranges, but it doesn't pull its weight anymore. We lose a tiny bit of diagnostic precision as can be seen in the test. I'm generally in favor of half-open ranges over explicit `x..=MAX` ranges anyway.
Diffstat (limited to 'tests/ui/pattern')
| -rw-r--r-- | tests/ui/pattern/usefulness/integer-ranges/exhaustiveness.stderr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/ui/pattern/usefulness/integer-ranges/exhaustiveness.stderr b/tests/ui/pattern/usefulness/integer-ranges/exhaustiveness.stderr index 90d0fd7483a..68976c1b057 100644 --- a/tests/ui/pattern/usefulness/integer-ranges/exhaustiveness.stderr +++ b/tests/ui/pattern/usefulness/integer-ranges/exhaustiveness.stderr @@ -107,17 +107,17 @@ help: ensure that all possible cases are being handled by adding a match arm wit LL | match $s { $($t)+ => {}, u128::MAX => todo!() } | ++++++++++++++++++++++ -error[E0004]: non-exhaustive patterns: `5_u128..=u128::MAX` not covered +error[E0004]: non-exhaustive patterns: `5_u128..` not covered --> $DIR/exhaustiveness.rs:61:8 | LL | m!(0u128, 0..=4); - | ^^^^^ pattern `5_u128..=u128::MAX` not covered + | ^^^^^ pattern `5_u128..` not covered | = note: the matched value is of type `u128` help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern or an explicit pattern as shown | -LL | match $s { $($t)+ => {}, 5_u128..=u128::MAX => todo!() } - | +++++++++++++++++++++++++++++++ +LL | match $s { $($t)+ => {}, 5_u128.. => todo!() } + | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `0_u128` not covered --> $DIR/exhaustiveness.rs:62:8 |
