@@ -2020,7 +2020,7 @@ macro_rules! uint_impl {
2020
2020
///
2021
2021
/// # Panics
2022
2022
///
2023
- /// This function will panic if `rhs` is 0 .
2023
+ /// This function will panic if `rhs` is zero .
2024
2024
///
2025
2025
/// # Examples
2026
2026
///
@@ -2034,7 +2034,6 @@ macro_rules! uint_impl {
2034
2034
#[ must_use = "this returns the result of the operation, \
2035
2035
without modifying the original"]
2036
2036
#[ inline( always) ]
2037
- #[ rustc_inherit_overflow_checks]
2038
2037
pub const fn div_floor( self , rhs: Self ) -> Self {
2039
2038
self / rhs
2040
2039
}
@@ -2043,7 +2042,12 @@ macro_rules! uint_impl {
2043
2042
///
2044
2043
/// # Panics
2045
2044
///
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).
2047
2051
///
2048
2052
/// # Examples
2049
2053
///
@@ -2073,7 +2077,12 @@ macro_rules! uint_impl {
2073
2077
///
2074
2078
/// # Panics
2075
2079
///
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).
2077
2086
///
2078
2087
/// # Examples
2079
2088
///
@@ -2097,7 +2106,7 @@ macro_rules! uint_impl {
2097
2106
}
2098
2107
2099
2108
/// 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
2101
2110
/// operation would result in overflow.
2102
2111
///
2103
2112
/// # Examples
@@ -2115,7 +2124,6 @@ macro_rules! uint_impl {
2115
2124
#[ must_use = "this returns the result of the operation, \
2116
2125
without modifying the original"]
2117
2126
#[ inline]
2118
- #[ rustc_inherit_overflow_checks]
2119
2127
pub const fn checked_next_multiple_of( self , rhs: Self ) -> Option <Self > {
2120
2128
match try_opt!( self . checked_rem( rhs) ) {
2121
2129
0 => Some ( self ) ,
0 commit comments