about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicole Mazzuca <npmazzuca@gmail.com>2018-12-20 01:37:20 -0800
committerNicole Mazzuca <npmazzuca@gmail.com>2018-12-20 01:37:20 -0800
commit455bc95317ddb3f8d528d0220bfde7f7a7286463 (patch)
tree114f4ecbf660e45fb0123b1bb8c26dde22d2a615
parent66bb34c3ab254d19623315d9d71695c3acb4e826 (diff)
downloadrust-455bc95317ddb3f8d528d0220bfde7f7a7286463.tar.gz
rust-455bc95317ddb3f8d528d0220bfde7f7a7286463.zip
fix nits
-rw-r--r--src/libcore/num/mod.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index cd8adfdd1fd..7ffb81901c6 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -1740,7 +1740,7 @@ $EndFeature, "
             concat!("Calculates the quotient of Euclidean division of `self` by `rhs`.
 
 This computes the integer `n` such that `self = n * rhs + self.rem_euclid(rhs)`,
-with the `0 <= self.rem_euclid(rhs) < rhs`.
+with `0 <= self.rem_euclid(rhs) < rhs`.
 
 In other words, the result is `self / rhs` rounded to the integer `n`
 such that `self >= n * rhs`.
@@ -1781,7 +1781,9 @@ assert_eq!((-a).div_euclid(-b), 2); // -7 >= -4 * 2
         doc_comment! {
             concat!("Calculates the least nonnegative remainder of `self (mod rhs)`.
 
-This is done as if by the Euclidean division algorithm.
+This is done as if by the Euclidean division algorithm -- given
+`r = self.rem_euclid(rhs)`, `self = rhs * self.div_euclid(rhs) + r`, and
+`0 <= r < abs(rhs)`.
 
 # Panics