@@ -326,8 +326,7 @@ impl IntRange {
326
326
/// `NegInfinity..PosInfinity`. In other words, as far as `IntRange` is concerned, there are
327
327
/// values before `isize::MIN` and after `usize::MAX`/`isize::MAX`.
328
328
/// This is to avoid e.g. `0..(u32::MAX as usize)` from being exhaustive on one architecture and
329
- /// not others. See discussions around the `precise_pointer_size_matching` feature for more
330
- /// details.
329
+ /// not others. This was decided in <https://github.com/rust-lang/rfcs/pull/2591>.
331
330
///
332
331
/// These infinities affect splitting subtly: it is possible to get `NegInfinity..0` and
333
332
/// `usize::MAX+1..PosInfinity` in the output. Diagnostics must be careful to handle these
@@ -380,7 +379,7 @@ impl IntRange {
380
379
/// Whether the range denotes the fictitious values before `isize::MIN` or after
381
380
/// `usize::MAX`/`isize::MAX` (see doc of [`IntRange::split`] for why these exist).
382
381
pub ( crate ) fn is_beyond_boundaries < ' tcx > ( & self , ty : Ty < ' tcx > , tcx : TyCtxt < ' tcx > ) -> bool {
383
- ty. is_ptr_sized_integral ( ) && !tcx . features ( ) . precise_pointer_size_matching && {
382
+ ty. is_ptr_sized_integral ( ) && {
384
383
// The two invalid ranges are `NegInfinity..isize::MIN` (represented as
385
384
// `NegInfinity..0`), and `{u,i}size::MAX+1..PosInfinity`. `to_diagnostic_pat_range_bdy`
386
385
// converts `MAX+1` to `PosInfinity`, and we couldn't have `PosInfinity` in `self.lo`
@@ -941,11 +940,8 @@ impl ConstructorSet {
941
940
}
942
941
}
943
942
& ty:: Int ( ity) => {
944
- let range = if ty. is_ptr_sized_integral ( )
945
- && !cx. tcx . features ( ) . precise_pointer_size_matching
946
- {
947
- // The min/max values of `isize` are not allowed to be observed unless the
948
- // `precise_pointer_size_matching` feature is enabled.
943
+ let range = if ty. is_ptr_sized_integral ( ) {
944
+ // The min/max values of `isize` are not allowed to be observed.
949
945
IntRange { lo : NegInfinity , hi : PosInfinity }
950
946
} else {
951
947
let bits = Integer :: from_int_ty ( & cx. tcx , ity) . size ( ) . bits ( ) as u128 ;
@@ -956,11 +952,8 @@ impl ConstructorSet {
956
952
Self :: Integers { range_1 : range, range_2 : None }
957
953
}
958
954
& ty:: Uint ( uty) => {
959
- let range = if ty. is_ptr_sized_integral ( )
960
- && !cx. tcx . features ( ) . precise_pointer_size_matching
961
- {
962
- // The max value of `usize` is not allowed to be observed unless the
963
- // `precise_pointer_size_matching` feature is enabled.
955
+ let range = if ty. is_ptr_sized_integral ( ) {
956
+ // The max value of `usize` is not allowed to be observed.
964
957
let lo = MaybeInfiniteInt :: new_finite ( cx. tcx , ty, 0 ) ;
965
958
IntRange { lo, hi : PosInfinity }
966
959
} else {
0 commit comments