#[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;
/// ```
#[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();
/// ```
#[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
/// ```
#[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();
/// 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 {
#[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",
/// 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 }