@@ -326,8 +326,7 @@ impl IntRange {
326326 /// `NegInfinity..PosInfinity`. In other words, as far as `IntRange` is concerned, there are
327327 /// values before `isize::MIN` and after `usize::MAX`/`isize::MAX`.
328328 /// 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>.
331330 ///
332331 /// These infinities affect splitting subtly: it is possible to get `NegInfinity..0` and
333332 /// `usize::MAX+1..PosInfinity` in the output. Diagnostics must be careful to handle these
@@ -380,7 +379,7 @@ impl IntRange {
380379 /// Whether the range denotes the fictitious values before `isize::MIN` or after
381380 /// `usize::MAX`/`isize::MAX` (see doc of [`IntRange::split`] for why these exist).
382381 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 ( ) && {
384383 // The two invalid ranges are `NegInfinity..isize::MIN` (represented as
385384 // `NegInfinity..0`), and `{u,i}size::MAX+1..PosInfinity`. `to_diagnostic_pat_range_bdy`
386385 // converts `MAX+1` to `PosInfinity`, and we couldn't have `PosInfinity` in `self.lo`
@@ -941,11 +940,8 @@ impl ConstructorSet {
941940 }
942941 }
943942 & 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.
949945 IntRange { lo : NegInfinity , hi : PosInfinity }
950946 } else {
951947 let bits = Integer :: from_int_ty ( & cx. tcx , ity) . size ( ) . bits ( ) as u128 ;
@@ -956,11 +952,8 @@ impl ConstructorSet {
956952 Self :: Integers { range_1 : range, range_2 : None }
957953 }
958954 & 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.
964957 let lo = MaybeInfiniteInt :: new_finite ( cx. tcx , ty, 0 ) ;
965958 IntRange { lo, hi : PosInfinity }
966959 } else {
0 commit comments