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/>.
This commit is contained in:
Corey Richardson 2014-12-05 10:07:07 -08:00
commit 560b8f6c59
2 changed files with 5 additions and 5 deletions

View File

@ -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
//!

View File

@ -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
///