@@ -982,9 +982,13 @@ macro_rules! int_impl {
982982 ///
983983 /// This function will always panic on overflow, regardless of whether overflow checks are enabled.
984984 ///
985- /// The only case where such an overflow can occur is when one divides `MIN / -1` on a signed type (where
986- /// `MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value
987- /// that is too large to represent in the type.
985+ /// The only case where such an overflow can occur is when one divides `MIN / -1` on a
986+ /// signed type (where `MIN` is the negative minimal value for the type); in wrapping
987+ /// arithmetic, this is equivalent to `-MIN`, a positive value that is too large to
988+ /// represent in the type.
989+ ///
990+ /// Note that this is equivalent to normal division: `MIN / -1` will also panic both in
991+ /// debug and release builds.
988992 ///
989993 /// # Examples
990994 ///
@@ -1010,8 +1014,8 @@ macro_rules! int_impl {
10101014 #[ inline]
10111015 #[ track_caller]
10121016 pub const fn strict_div( self , rhs: Self ) -> Self {
1013- let ( a , b ) = self . overflowing_div ( rhs ) ;
1014- if b { imp :: overflow_panic :: div ( ) } else { a }
1017+ // Normal division already checks for "div-by-minus-1".
1018+ self / rhs
10151019 }
10161020
10171021 /// Checked Euclidean division. Computes `self.div_euclid(rhs)`,
@@ -1053,6 +1057,9 @@ macro_rules! int_impl {
10531057 /// `MIN` is the negative minimal value for the type); this is equivalent to `-MIN`, a positive value
10541058 /// that is too large to represent in the type.
10551059 ///
1060+ /// Note that this is equivalent to `div_euclid`: `MIN.div_euclid(-1)` will also panic both
1061+ /// in debug and release builds.
1062+ ///
10561063 /// # Examples
10571064 ///
10581065 /// ```
@@ -1077,8 +1084,8 @@ macro_rules! int_impl {
10771084 #[ inline]
10781085 #[ track_caller]
10791086 pub const fn strict_div_euclid( self , rhs: Self ) -> Self {
1080- let ( a , b ) = self . overflowing_div_euclid ( rhs ) ;
1081- if b { imp :: overflow_panic :: div ( ) } else { a }
1087+ // Normal `div_euclid` already checks for "div-by-minus-1".
1088+ self . div_euclid ( rhs )
10821089 }
10831090
10841091 /// Checked integer division without remainder. Computes `self / rhs`,
0 commit comments