From f125b71c0081acebbfcdd60bfe517d7e4dd388d4 Mon Sep 17 00:00:00 2001 From: Brendan Zabarauskas Date: Sat, 18 Jan 2014 08:54:13 +1100 Subject: Add FIXME comments regarding issue #11526. --- src/libstd/num/f32.rs | 7 +++++++ src/libstd/num/f64.rs | 7 +++++++ src/libstd/num/int_macros.rs | 8 ++++++++ 3 files changed, 22 insertions(+) (limited to 'src/libstd') diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs index 69686253562..6eb96494420 100644 --- a/src/libstd/num/f32.rs +++ b/src/libstd/num/f32.rs @@ -96,6 +96,9 @@ delegate!( fn tanh(n: c_float) -> c_float = cmath::c_float::tanh ) +// FIXME(#11621): These constants should be deprecated once CTFE is implemented +// in favour of calling their respective functions in `Bounded` and `Float`. + pub static RADIX: uint = 2u; pub static MANTISSA_DIGITS: uint = 53u; @@ -122,6 +125,10 @@ pub static NEG_INFINITY: f32 = -1.0_f32/0.0_f32; pub mod consts { // FIXME (requires Issue #1433 to fix): replace with mathematical // staticants from cmath. + + // FIXME(#11621): These constants should be deprecated once CTFE is + // implemented in favour of calling their respective functions in `Real`. + /// Archimedes' constant pub static PI: f32 = 3.14159265358979323846264338327950288_f32; diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index bdfb42b4b88..32fe1391db4 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -101,6 +101,9 @@ delegate!( // FIXME (#1433): obtain these in a different way +// FIXME(#11621): These constants should be deprecated once CTFE is implemented +// in favour of calling their respective functions in `Bounded` and `Float`. + pub static RADIX: uint = 2u; pub static MANTISSA_DIGITS: uint = 53u; @@ -129,6 +132,10 @@ pub static NEG_INFINITY: f64 = -1.0_f64/0.0_f64; pub mod consts { // FIXME (requires Issue #1433 to fix): replace with mathematical // constants from cmath. + + // FIXME(#11621): These constants should be deprecated once CTFE is + // implemented in favour of calling their respective functions in `Real`. + /// Archimedes' constant pub static PI: f64 = 3.14159265358979323846264338327950288_f64; diff --git a/src/libstd/num/int_macros.rs b/src/libstd/num/int_macros.rs index 80bc24e2d62..7102a899758 100644 --- a/src/libstd/num/int_macros.rs +++ b/src/libstd/num/int_macros.rs @@ -13,11 +13,19 @@ macro_rules! int_module (($T:ty, $bits:expr) => ( +// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of +// calling the `mem::size_of` function. pub static bits : uint = $bits; +// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of +// calling the `mem::size_of` function. pub static bytes : uint = ($bits / 8); +// FIXME(#11621): Should be deprecated once CTFE is implemented in favour of +// calling the `Bounded::min_value` function. pub static min_value: $T = (-1 as $T) << (bits - 1); // FIXME(#9837): Compute min_value 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. pub static max_value: $T = !min_value; impl CheckedDiv for $T { -- cgit 1.4.1-3-g733a5