From 6182084e58bf3fde2e700424bf7d6ea708641f74 Mon Sep 17 00:00:00 2001 From: Victor van den Elzen Date: Tue, 2 Dec 2014 20:42:09 +0100 Subject: [PATCH 1/2] Improve documentation of checked_* functions --- src/libcore/num/mod.rs | 8 ++++---- 1 file 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; - /// 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; - /// 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; - /// 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 /// From d8c5269dd2eb14e3d1fefa4a2a26f3ff6a9f1ba8 Mon Sep 17 00:00:00 2001 From: Victor van den Elzen Date: Tue, 2 Dec 2014 20:43:47 +0100 Subject: [PATCH 2/2] Update comment to current file path for intrinsics --- src/libcore/intrinsics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcore/intrinsics.rs b/src/libcore/intrinsics.rs index 78c74075d48..11a1073343e 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 //!