@@ -2020,7 +2020,7 @@ macro_rules! uint_impl {
20202020 ///
20212021 /// # Panics
20222022 ///
2023- /// This function will panic if `rhs` is 0 .
2023+ /// This function will panic if `rhs` is zero .
20242024 ///
20252025 /// # Examples
20262026 ///
@@ -2034,7 +2034,6 @@ macro_rules! uint_impl {
20342034 #[ must_use = "this returns the result of the operation, \
20352035 without modifying the original"]
20362036 #[ inline( always) ]
2037- #[ rustc_inherit_overflow_checks]
20382037 pub const fn div_floor( self , rhs: Self ) -> Self {
20392038 self / rhs
20402039 }
@@ -2043,7 +2042,12 @@ macro_rules! uint_impl {
20432042 ///
20442043 /// # Panics
20452044 ///
2046- /// This function will panic if `rhs` is 0.
2045+ /// This function will panic if `rhs` is zero.
2046+ ///
2047+ /// ## Overflow behavior
2048+ ///
2049+ /// On overflow, this function will panic if overflow checks are enabled (default in debug
2050+ /// mode) and wrap if overflow checks are disabled (default in release mode).
20472051 ///
20482052 /// # Examples
20492053 ///
@@ -2073,7 +2077,12 @@ macro_rules! uint_impl {
20732077 ///
20742078 /// # Panics
20752079 ///
2076- /// This function will panic if `rhs` is 0 or the operation results in overflow.
2080+ /// This function will panic if `rhs` is zero.
2081+ ///
2082+ /// ## Overflow behavior
2083+ ///
2084+ /// On overflow, this function will panic if overflow checks are enabled (default in debug
2085+ /// mode) and wrap if overflow checks are disabled (default in release mode).
20772086 ///
20782087 /// # Examples
20792088 ///
@@ -2097,7 +2106,7 @@ macro_rules! uint_impl {
20972106 }
20982107
20992108 /// Calculates the smallest value greater than or equal to `self` that
2100- /// is a multiple of `rhs`. Returns `None` is `rhs` is zero or the
2109+ /// is a multiple of `rhs`. Returns `None` if `rhs` is zero or the
21012110 /// operation would result in overflow.
21022111 ///
21032112 /// # Examples
@@ -2115,7 +2124,6 @@ macro_rules! uint_impl {
21152124 #[ must_use = "this returns the result of the operation, \
21162125 without modifying the original"]
21172126 #[ inline]
2118- #[ rustc_inherit_overflow_checks]
21192127 pub const fn checked_next_multiple_of( self , rhs: Self ) -> Option <Self > {
21202128 match try_opt!( self . checked_rem( rhs) ) {
21212129 0 => Some ( self ) ,
0 commit comments