Rollup merge of #148935 - Wilfred:fix_remainder_docs, r=Mark-Simulacrum
Fix division syntax in doc comments `mod` is a keyword in Rust, and since we're talking about remainders we should be using division syntax here.
This commit is contained in:
commit
80b4c44f62
6 changed files with 12 additions and 6 deletions
|
|
@ -1753,7 +1753,8 @@ impl f128 {
|
|||
q
|
||||
}
|
||||
|
||||
/// Calculates the least nonnegative remainder of `self (mod rhs)`.
|
||||
/// Calculates the least nonnegative remainder of `self` when
|
||||
/// divided by `rhs`.
|
||||
///
|
||||
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
|
||||
/// most cases. However, due to a floating point round-off error it can
|
||||
|
|
|
|||
|
|
@ -1728,7 +1728,8 @@ impl f16 {
|
|||
q
|
||||
}
|
||||
|
||||
/// Calculates the least nonnegative remainder of `self (mod rhs)`.
|
||||
/// Calculates the least nonnegative remainder of `self` when
|
||||
/// divided by `rhs`.
|
||||
///
|
||||
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
|
||||
/// most cases. However, due to a floating point round-off error it can
|
||||
|
|
|
|||
|
|
@ -3147,7 +3147,8 @@ macro_rules! int_impl {
|
|||
}
|
||||
|
||||
|
||||
/// Calculates the least nonnegative remainder of `self (mod rhs)`.
|
||||
/// Calculates the least nonnegative remainder of `self` when
|
||||
/// divided by `rhs`.
|
||||
///
|
||||
/// This is done as if by the Euclidean division algorithm -- given
|
||||
/// `r = self.rem_euclid(rhs)`, the result satisfies
|
||||
|
|
|
|||
|
|
@ -3481,7 +3481,8 @@ macro_rules! uint_impl {
|
|||
}
|
||||
|
||||
|
||||
/// Calculates the least remainder of `self (mod rhs)`.
|
||||
/// Calculates the least remainder of `self` when divided by
|
||||
/// `rhs`.
|
||||
///
|
||||
/// Since, for the positive integers, all common
|
||||
/// definitions of division are equal, this
|
||||
|
|
|
|||
|
|
@ -252,7 +252,8 @@ impl f32 {
|
|||
core::f32::math::div_euclid(self, rhs)
|
||||
}
|
||||
|
||||
/// Calculates the least nonnegative remainder of `self (mod rhs)`.
|
||||
/// Calculates the least nonnegative remainder of `self` when divided by
|
||||
/// `rhs`.
|
||||
///
|
||||
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
|
||||
/// most cases. However, due to a floating point round-off error it can
|
||||
|
|
|
|||
|
|
@ -252,7 +252,8 @@ impl f64 {
|
|||
core::f64::math::div_euclid(self, rhs)
|
||||
}
|
||||
|
||||
/// Calculates the least nonnegative remainder of `self (mod rhs)`.
|
||||
/// Calculates the least nonnegative remainder of `self` when divided by
|
||||
/// `rhs`.
|
||||
///
|
||||
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
|
||||
/// most cases. However, due to a floating point round-off error it can
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue