about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorTrevor Spiteri <tspiteri@ieee.org>2019-10-17 13:53:57 +0200
committerTrevor Spiteri <tspiteri@ieee.org>2019-10-17 13:53:57 +0200
commit83e97c6ac1b722c1b55fdf9d6378f87d9e0cdbdd (patch)
tree4430b127fdd220834d6cae6648de6de5f8c18442 /src/libcore
parenta16dca337de610986252bb800953e57bf395863f (diff)
downloadrust-83e97c6ac1b722c1b55fdf9d6378f87d9e0cdbdd.tar.gz
rust-83e97c6ac1b722c1b55fdf9d6378f87d9e0cdbdd.zip
properly document panics in div_euclid and rem_euclid
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/num/mod.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index 998c8f81652..8f4ade377e3 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -1864,7 +1864,7 @@ if `self < 0`, this is equal to round towards +/- infinity.
 
 # Panics
 
-This function will panic if `rhs` is 0.
+This function will panic if `rhs` is 0 or the division results in overflow.
 
 # Examples
 
@@ -1903,7 +1903,7 @@ This is done as if by the Euclidean division algorithm -- given
 
 # Panics
 
-This function will panic if `rhs` is 0.
+This function will panic if `rhs` is 0 or the division results in overflow.
 
 # Examples
 
@@ -3694,6 +3694,10 @@ Since, for the positive integers, all common
 definitions of division are equal, this
 is exactly equal to `self / rhs`.
 
+# Panics
+
+This function will panic if `rhs` is 0.
+
 # Examples
 
 Basic usage:
@@ -3719,6 +3723,10 @@ Since, for the positive integers, all common
 definitions of division are equal, this
 is exactly equal to `self % rhs`.
 
+# Panics
+
+This function will panic if `rhs` is 0.
+
 # Examples
 
 Basic usage: