diff options
| author | Trevor Spiteri <tspiteri@ieee.org> | 2017-12-21 02:39:01 +0100 |
|---|---|---|
| committer | Trevor Spiteri <tspiteri@ieee.org> | 2017-12-21 02:39:01 +0100 |
| commit | 9d6bd0536aed290f4fe80b42820fcf2463d2f8b3 (patch) | |
| tree | 7ad43434c283c05405836e8eea77b2d206a3a39f /src/libcore/num | |
| parent | 7eb64b86ce44cc1828dd176a8b981e37ea08fc38 (diff) | |
| download | rust-9d6bd0536aed290f4fe80b42820fcf2463d2f8b3.tar.gz rust-9d6bd0536aed290f4fe80b42820fcf2463d2f8b3.zip | |
docs: do not call integer overflows as underflows
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/bignum.rs | 2 | ||||
| -rw-r--r-- | src/libcore/num/mod.rs | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/src/libcore/num/bignum.rs b/src/libcore/num/bignum.rs index b5553fb2947..732a02e8c42 100644 --- a/src/libcore/num/bignum.rs +++ b/src/libcore/num/bignum.rs @@ -114,7 +114,7 @@ macro_rules! define_bignum { /// copying it recklessly may result in the performance hit. /// Thus this is intentionally not `Copy`. /// - /// All operations available to bignums panic in the case of over/underflows. + /// All operations available to bignums panic in the case of overflows. /// The caller is responsible to use large enough bignum types. pub struct $name { /// One plus the offset to the maximum "digit" in use. diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 245ca83f28f..10570b5adf3 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -402,7 +402,7 @@ macro_rules! int_impl { } /// Checked integer subtraction. Computes `self - rhs`, returning - /// `None` if underflow occurred. + /// `None` if overflow occurred. /// /// # Examples /// @@ -420,7 +420,7 @@ macro_rules! int_impl { } /// Checked integer multiplication. Computes `self * rhs`, returning - /// `None` if underflow or overflow occurred. + /// `None` if overflow occurred. /// /// # Examples /// @@ -438,7 +438,7 @@ macro_rules! int_impl { } /// Checked integer division. Computes `self / rhs`, returning `None` - /// if `rhs == 0` or the operation results in underflow or overflow. + /// if `rhs == 0` or the operation results in overflow. /// /// # Examples /// @@ -460,7 +460,7 @@ macro_rules! int_impl { } /// Checked integer remainder. Computes `self % rhs`, returning `None` - /// if `rhs == 0` or the operation results in underflow or overflow. + /// if `rhs == 0` or the operation results in overflow. /// /// # Examples /// @@ -1598,7 +1598,7 @@ macro_rules! uint_impl { } /// Checked integer subtraction. Computes `self - rhs`, returning - /// `None` if underflow occurred. + /// `None` if overflow occurred. /// /// # Examples /// @@ -1616,7 +1616,7 @@ macro_rules! uint_impl { } /// Checked integer multiplication. Computes `self * rhs`, returning - /// `None` if underflow or overflow occurred. + /// `None` if overflow occurred. /// /// # Examples /// @@ -1634,7 +1634,7 @@ macro_rules! uint_impl { } /// Checked integer division. Computes `self / rhs`, returning `None` - /// if `rhs == 0` or the operation results in underflow or overflow. + /// if `rhs == 0` or the operation results in overflow. /// /// # Examples /// @@ -1654,7 +1654,7 @@ macro_rules! uint_impl { } /// Checked integer remainder. Computes `self % rhs`, returning `None` - /// if `rhs == 0` or the operation results in underflow or overflow. + /// if `rhs == 0` or the operation results in overflow. /// /// # Examples /// |
