about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorVictor van den Elzen <victor.vde@gmail.com>2014-12-02 20:42:09 +0100
committerVictor van den Elzen <victor.vde@gmail.com>2014-12-02 20:56:41 +0100
commit6182084e58bf3fde2e700424bf7d6ea708641f74 (patch)
tree771a1d6fa57497796c192eb91570c79ed9855d8c /src/libcore
parent8dbe63200d56cfb848e7a58107c93a4f7a48f45c (diff)
downloadrust-6182084e58bf3fde2e700424bf7d6ea708641f74.tar.gz
rust-6182084e58bf3fde2e700424bf7d6ea708641f74.zip
Improve documentation of checked_* functions
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/num/mod.rs8
1 files changed, 4 insertions, 4 deletions
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
     ///