]> git.lizzy.rs Git - rust.git/blobdiff - src/libcore/num/mod.rs
Add #[rustc_no_mir] to make tests pass with -Z orbit.
[rust.git] / src / libcore / num / mod.rs
index ed370bb91648fc457a9359bdae4d4667a8701783..e6f83498ab1e2638dbd90b4cdc56c6c2c33a924d 100644 (file)
@@ -41,7 +41,7 @@
 #[derive(PartialEq, Eq, PartialOrd, Ord, Clone, Copy, Debug, Default)]
 pub struct Wrapping<T>(#[stable(feature = "rust1", since = "1.0.0")] pub T);
 
-pub mod wrapping;
+mod wrapping;
 
 // All these modules are technically private and only exposed for libcoretest:
 pub mod flt2dec;
@@ -1008,6 +1008,7 @@ pub fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
         /// ```
         #[stable(feature = "rust1", since = "1.0.0")]
         #[inline]
+        #[cfg_attr(not(stage0), rustc_no_mir)] // FIXME #29769 MIR overflow checking is TBD.
         pub fn pow(self, mut exp: u32) -> Self {
             let mut base = self;
             let mut acc = Self::one();
@@ -1049,6 +1050,7 @@ pub fn pow(self, mut exp: u32) -> Self {
         /// ```
         #[stable(feature = "rust1", since = "1.0.0")]
         #[inline]
+        #[cfg_attr(not(stage0), rustc_no_mir)] // FIXME #29769 MIR overflow checking is TBD.
         pub fn abs(self) -> Self {
             if self.is_negative() {
                 // Note that the #[inline] above means that the overflow
@@ -2013,6 +2015,7 @@ pub fn overflowing_shr(self, rhs: u32) -> (Self, bool) {
         /// ```
         #[stable(feature = "rust1", since = "1.0.0")]
         #[inline]
+        #[cfg_attr(not(stage0), rustc_no_mir)] // FIXME #29769 MIR overflow checking is TBD.
         pub fn pow(self, mut exp: u32) -> Self {
             let mut base = self;
             let mut acc = Self::one();
@@ -2179,8 +2182,8 @@ impl usize {
 /// This `enum` is used as the return type for [`f32::classify()`] and [`f64::classify()`]. See
 /// their documentation for more.
 ///
-/// [`f32::classify()`]: ../primitive.f32.html#method.classify
-/// [`f64::classify()`]: ../primitive.f64.html#method.classify
+/// [`f32::classify()`]: ../../std/primitive.f32.html#method.classify
+/// [`f64::classify()`]: ../../std/primitive.f64.html#method.classify
 #[derive(Copy, Clone, PartialEq, Debug)]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub enum FpCategory {
@@ -2209,7 +2212,7 @@ pub enum FpCategory {
 #[doc(hidden)]
 #[unstable(feature = "core_float",
            reason = "stable interface is via `impl f{32,64}` in later crates",
-           issue = "27702")]
+           issue = "32110")]
 pub trait Float: Sized {
     /// Returns the NaN value.
     #[unstable(feature = "float_extras", reason = "needs removal",
@@ -2411,7 +2414,7 @@ fn from_str_radix<T: FromStrRadixHelper>(src: &str, radix: u32)
 /// This error is used as the error type for the `from_str_radix()` functions
 /// on the primitive integer types, such as [`i8::from_str_radix()`].
 ///
-/// [`i8::from_str_radix()`]: ../std/primitive.i8.html#method.from_str_radix
+/// [`i8::from_str_radix()`]: ../../std/primitive.i8.html#method.from_str_radix
 #[derive(Debug, Clone, PartialEq)]
 #[stable(feature = "rust1", since = "1.0.0")]
 pub struct ParseIntError { kind: IntErrorKind }