core: mark relevant functions with #[rustc_inherit_overflow_checks].

This commit is contained in:
Eduard Burtescu
2016-05-26 19:02:26 +03:00
parent 4adc967ed1
commit 702c47baae
4 changed files with 19 additions and 3 deletions

View File

@@ -1033,7 +1033,7 @@ macro_rules! int_impl {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
#[rustc_inherit_overflow_checks]
pub fn pow(self, mut exp: u32) -> Self {
let mut base = self;
let mut acc = Self::one();
@@ -1075,7 +1075,7 @@ macro_rules! int_impl {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
#[rustc_inherit_overflow_checks]
pub fn abs(self) -> Self {
if self.is_negative() {
// Note that the #[inline] above means that the overflow
@@ -2061,7 +2061,7 @@ macro_rules! uint_impl {
/// ```
#[stable(feature = "rust1", since = "1.0.0")]
#[inline]
#[rustc_no_mir] // FIXME #29769 MIR overflow checking is TBD.
#[rustc_inherit_overflow_checks]
pub fn pow(self, mut exp: u32) -> Self {
let mut base = self;
let mut acc = Self::one();