Skip to content

Commit 3d15223

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 6d41834 commit 3d15223

File tree

6 files changed

+6
-6
lines changed

6 files changed

+6
-6
lines changed

library/core/src/num/f128.rs

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

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

library/core/src/num/f16.rs

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

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

library/core/src/num/int_macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3124,7 +3124,7 @@ 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 / rhs`.
31283128
///
31293129
/// This is done as if by the Euclidean division algorithm -- given
31303130
/// `r = self.rem_euclid(rhs)`, the result satisfies

library/core/src/num/uint_macros.rs

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

34013401

3402-
/// Calculates the least remainder of `self (mod rhs)`.
3402+
/// Calculates the least remainder of `self / rhs`.
34033403
///
34043404
/// Since, for the positive integers, all common
34053405
/// definitions of division are equal, this

library/std/src/num/f32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ 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 / rhs`.
256256
///
257257
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
258258
/// most cases. However, due to a floating point round-off error it can

library/std/src/num/f64.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ 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 / rhs`.
256256
///
257257
/// In particular, the return value `r` satisfies `0.0 <= r < rhs.abs()` in
258258
/// most cases. However, due to a floating point round-off error it can

0 commit comments

Comments
 (0)