about summary refs log tree commit diff
path: root/library/core/src
diff options
context:
space:
mode:
authorJames Haywood <jameshaywood@fastmail.com>2023-09-22 18:07:17 -0400
committerJames Haywood <jameshaywood@fastmail.com>2023-09-22 18:07:17 -0400
commitf286a756924eddfada894b05246e559262a6bd38 (patch)
treeec93d5ed2f6c4e152f5fe3bedf7a70df7e4fa3cb /library/core/src
parent1170b7b4478ed1674e0b498dfa52f0f68f6426c8 (diff)
downloadrust-f286a756924eddfada894b05246e559262a6bd38.tar.gz
rust-f286a756924eddfada894b05246e559262a6bd38.zip
Extend fix to wrapping_div, wrapping_div_euclid and wrapping_rem_euclid
Diffstat (limited to 'library/core/src')
-rw-r--r--library/core/src/num/uint_macros.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/library/core/src/num/uint_macros.rs b/library/core/src/num/uint_macros.rs
index 2e9f07e6a68..7cbef9e7793 100644
--- a/library/core/src/num/uint_macros.rs
+++ b/library/core/src/num/uint_macros.rs
@@ -1259,6 +1259,10 @@ macro_rules! uint_impl {
         /// This function exists, so that all operations
         /// are accounted for in the wrapping operations.
         ///
+        /// # Panics
+        ///
+        /// This function will panic if `rhs` is 0.
+        ///
         /// # Examples
         ///
         /// Basic usage:
@@ -1284,6 +1288,10 @@ macro_rules! uint_impl {
         /// definitions of division are equal, this
         /// is exactly equal to `self.wrapping_div(rhs)`.
         ///
+        /// # Panics
+        ///
+        /// This function will panic if `rhs` is 0.
+        ///
         /// # Examples
         ///
         /// Basic usage:
@@ -1337,6 +1345,10 @@ macro_rules! uint_impl {
         /// definitions of division are equal, this
         /// is exactly equal to `self.wrapping_rem(rhs)`.
         ///
+        /// # Panics
+        ///
+        /// This function will panic if `rhs` is 0.
+        ///
         /// # Examples
         ///
         /// Basic usage: