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.
This commit is contained in:
Matthias Krüger
2024-03-13 20:01:57 +01:00
committed by GitHub
4 changed files with 18 additions and 21 deletions

View File

@@ -706,7 +706,7 @@ impl<'p, 'tcx: 'p> RustcPatCtxt<'p, 'tcx> {
None => PatRangeBoundary::PosInfinity,
}
}
JustAfterMax | PosInfinity => PatRangeBoundary::PosInfinity,
PosInfinity => PatRangeBoundary::PosInfinity,
}
}