Extend fix to wrapping_div, wrapping_div_euclid and wrapping_rem_euclid

This commit is contained in:
James Haywood 2023-09-22 18:07:17 -04:00
parent 1170b7b447
commit f286a75692

View File

@ -1259,6 +1259,10 @@ pub const fn wrapping_mul(self, rhs: Self) -> Self {
/// This function exists, so that all operations
/// are accounted for in the wrapping operations.
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
///
/// # Examples
///
/// Basic usage:
@ -1284,6 +1288,10 @@ pub const fn wrapping_div(self, rhs: Self) -> Self {
/// definitions of division are equal, this
/// is exactly equal to `self.wrapping_div(rhs)`.
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
///
/// # Examples
///
/// Basic usage:
@ -1337,6 +1345,10 @@ pub const fn wrapping_rem(self, rhs: Self) -> Self {
/// definitions of division are equal, this
/// is exactly equal to `self.wrapping_rem(rhs)`.
///
/// # Panics
///
/// This function will panic if `rhs` is 0.
///
/// # Examples
///
/// Basic usage: