Skip to content

Commit 95b5bba

Browse files
committed
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.
1 parent e65b983 commit 95b5bba

File tree

6 files changed

+12
-6
lines changed

6 files changed

+12
-6
lines changed

library/core/src/num/f128.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1704,7 +1704,8 @@ impl f128 {
17041704
q
17051705
}
17061706

1707-
/// Calculates the least nonnegative remainder of `self (mod rhs)`.
1707+
/// Calculates the least nonnegative remainder of `self` when
1708+
/// divided by `rhs`.
17081709
///
17091710
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
17101711
/// most cases. However, due to a floating point round-off error it can

library/core/src/num/f16.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,8 @@ impl f16 {
16791679
q
16801680
}
16811681

1682-
/// Calculates the least nonnegative remainder of `self (mod rhs)`.
1682+
/// Calculates the least nonnegative remainder of `self` when
1683+
/// divided by `rhs`.
16831684
///
16841685
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
16851686
/// most cases. However, due to a floating point round-off error it can

library/core/src/num/int_macros.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3124,7 +3124,8 @@ macro_rules! int_impl {
31243124
}
31253125

31263126

3127-
/// Calculates the least nonnegative remainder of `self (mod rhs)`.
3127+
/// Calculates the least nonnegative remainder of `self` when
3128+
/// divided by `rhs`.
31283129
///
31293130
/// This is done as if by the Euclidean division algorithm -- given
31303131
/// `r = self.rem_euclid(rhs)`, the result satisfies

library/core/src/num/uint_macros.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3399,7 +3399,8 @@ macro_rules! uint_impl {
33993399
}
34003400

34013401

3402-
/// Calculates the least remainder of `self (mod rhs)`.
3402+
/// Calculates the least remainder of `self` when divided by
3403+
/// `rhs`.
34033404
///
34043405
/// Since, for the positive integers, all common
34053406
/// definitions of division are equal, this

library/std/src/num/f32.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ impl f32 {
252252
core::f32::math::div_euclid(self, rhs)
253253
}
254254

255-
/// Calculates the least nonnegative remainder of `self (mod rhs)`.
255+
/// Calculates the least nonnegative remainder of `self` when divided by
256+
/// `rhs`.
256257
///
257258
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
258259
/// most cases. However, due to a floating point round-off error it can

library/std/src/num/f64.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,8 @@ impl f64 {
252252
core::f64::math::div_euclid(self, rhs)
253253
}
254254

255-
/// Calculates the least nonnegative remainder of `self (mod rhs)`.
255+
/// Calculates the least nonnegative remainder of `self` when divided by
256+
/// `rhs`.
256257
///
257258
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
258259
/// most cases. However, due to a floating point round-off error it can

0 commit comments

Comments
 (0)