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:
Stuart Cook 2025-12-08 11:46:22 +11:00 committed by GitHub
commit 80b4c44f62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 12 additions and 6 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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