about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorCorey Richardson <corey@octayn.net>2014-12-05 10:07:07 -0800
committerCorey Richardson <corey@octayn.net>2014-12-05 10:07:07 -0800
commit560b8f6c593e7a232f78fc071a305927e935d352 (patch)
tree55f57e50c01eb381e5ba7fd2ab64ba7e13e49c3b /src/libcore
parentfb55cbda8dcdbfe2b5619691d1f80d542fb9fc58 (diff)
parentd8c5269dd2eb14e3d1fefa4a2a26f3ff6a9f1ba8 (diff)
downloadrust-560b8f6c593e7a232f78fc071a305927e935d352.tar.gz
rust-560b8f6c593e7a232f78fc071a305927e935d352.zip
rollup merge of #19468: victorvde/master
1. Made small improvements to the docs for checked_sub, checked_mul and checked_div.
2. Updated a confusingly outdated comment for intrinsics, noticed before at <https://stackoverflow.com/questions/23582931/>.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/intrinsics.rs2
-rw-r--r--src/libcore/num/mod.rs8
2 files changed, 5 insertions, 5 deletions
diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs
index 347777b587a..ece2ac6975e 100644
--- a/src/libcore/intrinsics.rs
+++ b/src/libcore/intrinsics.rs
@@ -10,7 +10,7 @@
 
 //! rustc compiler intrinsics.
 //!
-//! The corresponding definitions are in librustc/middle/trans/foreign.rs.
+//! The corresponding definitions are in librustc_trans/trans/intrinsic.rs.
 //!
 //! # Volatiles
 //!
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index ce61bd97e13..748e8942a3f 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -284,7 +284,7 @@ pub trait Int
     /// ```
     fn checked_add(self, other: Self) -> Option<Self>;
 
-    /// Checked integer subtraction. Computes `self + other`, returning `None`
+    /// Checked integer subtraction. Computes `self - other`, returning `None`
     /// if underflow occurred.
     ///
     /// # Example
@@ -297,7 +297,7 @@ pub trait Int
     /// ```
     fn checked_sub(self, other: Self) -> Option<Self>;
 
-    /// Checked integer multiplication. Computes `self + other`, returning
+    /// Checked integer multiplication. Computes `self * other`, returning
     /// `None` if underflow or overflow occurred.
     ///
     /// # Example
@@ -310,8 +310,8 @@ pub trait Int
     /// ```
     fn checked_mul(self, other: Self) -> Option<Self>;
 
-    /// Checked integer division. Computes `self + other` returning `None` if
-    /// `self == 0` or the operation results in underflow or overflow.
+    /// Checked integer division. Computes `self / other`, returning `None` if
+    /// `other == 0` or the operation results in underflow or overflow.
     ///
     /// # Example
     ///