///
/// # Panics
///
- /// This function will panic if `rhs` is 0 or the division results in overflow.
+ /// This function will panic if `rhs` is zero.
+ ///
+ /// ## Overflow behavior
+ ///
+ /// On overflow, this function will panic if overflow checks are enabled (default in debug
+ /// mode) and wrap if overflow checks are disabled (default in release mode).
///
/// # Examples
///
///
/// # Panics
///
- /// This function will panic if `rhs` is 0 or the division results in overflow.
+ /// This function will panic if `rhs` is zero.
+ ///
+ /// ## Overflow behavior
+ ///
+ /// On overflow, this function will panic if overflow checks are enabled (default in debug
+ /// mode) and wrap if overflow checks are disabled (default in release mode).
///
/// # Examples
///
///
/// # Panics
///
- /// This function will panic if `rhs` is 0 or the operation results in overflow.
+ /// This function will panic if `rhs` is zero.
+ ///
+ /// ## Overflow behavior
+ ///
+ /// On overflow, this function will panic if overflow checks are enabled (default in debug
+ /// mode) and wrap if overflow checks are disabled (default in release mode).
///
/// # Examples
///
#[must_use = "this returns the result of the operation, \
without modifying the original"]
#[inline]
- #[rustc_inherit_overflow_checks]
pub const fn checked_next_multiple_of(self, rhs: Self) -> Option<Self> {
// This would otherwise fail when calculating `r` when self == T::MIN.
if rhs == -1 {