Temp fix for all constants that are missing docs.
This commit is contained in:
@@ -414,17 +414,22 @@ macro_rules! repeat_u8_as_u64 {
|
||||
//
|
||||
// And of course, 0x00 brings back the old world of zero'ing on drop.
|
||||
#[unstable(feature = "filling_drop")]
|
||||
#[allow(missing_docs)]
|
||||
pub const POST_DROP_U8: u8 = 0x1d;
|
||||
#[unstable(feature = "filling_drop")]
|
||||
#[allow(missing_docs)]
|
||||
pub const POST_DROP_U32: u32 = repeat_u8_as_u32!(POST_DROP_U8);
|
||||
#[unstable(feature = "filling_drop")]
|
||||
#[allow(missing_docs)]
|
||||
pub const POST_DROP_U64: u64 = repeat_u8_as_u64!(POST_DROP_U8);
|
||||
|
||||
#[cfg(target_pointer_width = "32")]
|
||||
#[unstable(feature = "filling_drop")]
|
||||
#[allow(missing_docs)]
|
||||
pub const POST_DROP_USIZE: usize = POST_DROP_U32 as usize;
|
||||
#[cfg(target_pointer_width = "64")]
|
||||
#[unstable(feature = "filling_drop")]
|
||||
#[allow(missing_docs)]
|
||||
pub const POST_DROP_USIZE: usize = POST_DROP_U64 as usize;
|
||||
|
||||
/// Interprets `src` as `&U`, and then reads `src` without moving the contained
|
||||
|
||||
@@ -24,14 +24,18 @@ use num::{Float, ParseFloatError};
|
||||
use num::FpCategory as Fp;
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const RADIX: u32 = 2;
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MANTISSA_DIGITS: u32 = 24;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const DIGITS: u32 = 6;
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const EPSILON: f32 = 1.19209290e-07_f32;
|
||||
|
||||
/// Smallest finite f32 value
|
||||
@@ -45,20 +49,27 @@ pub const MIN_POSITIVE: f32 = 1.17549435e-38_f32;
|
||||
pub const MAX: f32 = 3.40282347e+38_f32;
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MIN_EXP: i32 = -125;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MAX_EXP: i32 = 128;
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MIN_10_EXP: i32 = -37;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MAX_10_EXP: i32 = 38;
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const NAN: f32 = 0.0_f32/0.0_f32;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const INFINITY: f32 = 1.0_f32/0.0_f32;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const NEG_INFINITY: f32 = -1.0_f32/0.0_f32;
|
||||
|
||||
/// Basic mathematial constants.
|
||||
|
||||
@@ -24,14 +24,18 @@ use num::FpCategory as Fp;
|
||||
use num::{Float, ParseFloatError};
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const RADIX: u32 = 2;
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MANTISSA_DIGITS: u32 = 53;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const DIGITS: u32 = 15;
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const EPSILON: f64 = 2.2204460492503131e-16_f64;
|
||||
|
||||
/// Smallest finite f64 value
|
||||
@@ -45,20 +49,27 @@ pub const MIN_POSITIVE: f64 = 2.2250738585072014e-308_f64;
|
||||
pub const MAX: f64 = 1.7976931348623157e+308_f64;
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MIN_EXP: i32 = -1021;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MAX_EXP: i32 = 1024;
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MIN_10_EXP: i32 = -307;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MAX_10_EXP: i32 = 308;
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const NAN: f64 = 0.0_f64/0.0_f64;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const INFINITY: f64 = 1.0_f64/0.0_f64;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const NEG_INFINITY: f64 = -1.0_f64/0.0_f64;
|
||||
|
||||
/// Basic mathematial constants.
|
||||
|
||||
@@ -16,21 +16,25 @@ macro_rules! int_module { ($T:ty, $bits:expr) => (
|
||||
// calling the `mem::size_of` function.
|
||||
#[unstable(feature = "num_bits_bytes",
|
||||
reason = "may want to be an associated function")]
|
||||
#[allow(missing_docs)]
|
||||
pub const BITS : usize = $bits;
|
||||
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
|
||||
// calling the `mem::size_of` function.
|
||||
#[unstable(feature = "num_bits_bytes",
|
||||
reason = "may want to be an associated function")]
|
||||
#[allow(missing_docs)]
|
||||
pub const BYTES : usize = ($bits / 8);
|
||||
|
||||
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
|
||||
// calling the `Bounded::min_value` function.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MIN: $T = (-1 as $T) << (BITS - 1);
|
||||
// FIXME(#9837): Compute MIN like this so the high bits that shouldn't exist are 0.
|
||||
// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of
|
||||
// calling the `Bounded::max_value` function.
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MAX: $T = !MIN;
|
||||
|
||||
) }
|
||||
|
||||
@@ -14,14 +14,18 @@ macro_rules! uint_module { ($T:ty, $T_SIGNED:ty, $bits:expr) => (
|
||||
|
||||
#[unstable(feature = "num_bits_bytes",
|
||||
reason = "may want to be an associated function")]
|
||||
#[allow(missing_docs)]
|
||||
pub const BITS : usize = $bits;
|
||||
#[unstable(feature = "num_bits_bytes",
|
||||
reason = "may want to be an associated function")]
|
||||
#[allow(missing_docs)]
|
||||
pub const BYTES : usize = ($bits / 8);
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MIN: $T = 0 as $T;
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[allow(missing_docs)]
|
||||
pub const MAX: $T = !0 as $T;
|
||||
|
||||
) }
|
||||
|
||||
Reference in New Issue
Block a user