diff options
| author | pravic <[email protected]> | 2016-04-12 17:48:41 +0300 |
|---|---|---|
| committer | pravic <[email protected]> | 2016-04-12 17:48:41 +0300 |
| commit | c868536ae3f7c468ab62e4853e806d6d4150bdc5 (patch) | |
| tree | 9f2b0fbe414eb81dc1cdd92aa5754e9063bf2c20 /libcore/num/mod.rs | |
| parent | add libcore from 2016-04-11 nightly (diff) | |
| download | kmd-env-rs-c868536ae3f7c468ab62e4853e806d6d4150bdc5.tar.xz kmd-env-rs-c868536ae3f7c468ab62e4853e806d6d4150bdc5.zip | |
apply libcore_nofp patch
Diffstat (limited to 'libcore/num/mod.rs')
| -rw-r--r-- | libcore/num/mod.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libcore/num/mod.rs b/libcore/num/mod.rs index 229a864..e966d1b 100644 --- a/libcore/num/mod.rs +++ b/libcore/num/mod.rs @@ -44,7 +44,9 @@ pub struct Wrapping<T>(#[stable(feature = "rust1", since = "1.0.0")] pub T); mod wrapping; // All these modules are technically private and only exposed for libcoretest: +#[cfg(not(disable_float))] pub mod flt2dec; +#[cfg(not(disable_float))] pub mod dec2flt; pub mod bignum; pub mod diy_float; @@ -111,6 +113,7 @@ macro_rules! zero_one_impl_float { } )*) } +#[cfg(not(disable_float))] zero_one_impl_float! { f32 f64 } macro_rules! checked_op { @@ -2213,6 +2216,7 @@ pub enum FpCategory { #[unstable(feature = "core_float", reason = "stable interface is via `impl f{32,64}` in later crates", issue = "32110")] +#[cfg(not(disable_float))] pub trait Float: Sized { /// Returns the NaN value. #[unstable(feature = "float_extras", reason = "needs removal", @@ -2451,6 +2455,7 @@ impl fmt::Display for ParseIntError { } #[stable(feature = "rust1", since = "1.0.0")] +#[cfg(not(disable_float))] pub use num::dec2flt::ParseFloatError; // Conversion traits for primitive integer and float types @@ -2498,6 +2503,9 @@ impl_from! { u32, i64 } // they fit in the significand, which is 24 bits in f32 and 53 bits in f64. // Lossy float conversions are not implemented at this time. +#[cfg(not(disable_float))] +mod _int_flot_conv { +use convert::From; // Signed -> Float impl_from! { i8, f32 } impl_from! { i8, f64 } @@ -2514,3 +2522,4 @@ impl_from! { u32, f64 } // Float -> Float impl_from! { f32, f64 } +} |