From ec078a033bdd2a4d076f78f2e655b8c3e5e4bf6a Mon Sep 17 00:00:00 2001 From: Oliver 'ker' Schneider Date: Sun, 7 Jun 2015 19:50:13 +0200 Subject: change some statics to constants --- src/libcore/num/flt2dec/strategy/dragon.rs | 2 -- src/libcore/num/flt2dec/strategy/grisu.rs | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) (limited to 'src/libcore') diff --git a/src/libcore/num/flt2dec/strategy/dragon.rs b/src/libcore/num/flt2dec/strategy/dragon.rs index a819932525b..a1137789371 100644 --- a/src/libcore/num/flt2dec/strategy/dragon.rs +++ b/src/libcore/num/flt2dec/strategy/dragon.rs @@ -24,7 +24,6 @@ use num::flt2dec::estimator::estimate_scaling_factor; use num::flt2dec::bignum::Digit32 as Digit; use num::flt2dec::bignum::Big32x36 as Big; -// FIXME(#22540) const ref to static array seems to ICE static POW10: [Digit; 10] = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000]; static TWOPOW10: [Digit; 10] = [2, 20, 200, 2000, 20000, 200000, @@ -328,4 +327,3 @@ pub fn format_exact(d: &Decoded, buf: &mut [u8], limit: i16) -> (/*#digits*/ usi (len, k) } - diff --git a/src/libcore/num/flt2dec/strategy/grisu.rs b/src/libcore/num/flt2dec/strategy/grisu.rs index 220811e9985..54d3c92eca4 100644 --- a/src/libcore/num/flt2dec/strategy/grisu.rs +++ b/src/libcore/num/flt2dec/strategy/grisu.rs @@ -87,7 +87,7 @@ for i in xrange(-308, 333, 8): f = ((f << 64 >> (l-1)) + 1) >> 1; e += l - 64 print ' (%#018x, %5d, %4d),' % (f, e, i) */ -// FIXME(#22540) const ref to static array seems to ICE + #[doc(hidden)] pub static CACHED_POW10: [(u64, i16, i16); 81] = [ // (f, e, k) (0xe61acf033d1a45df, -1087, -308), @@ -746,4 +746,3 @@ pub fn format_exact(d: &Decoded, buf: &mut [u8], limit: i16) -> (/*#digits*/ usi None => fallback(d, buf, limit), } } - -- cgit 1.4.1-3-g733a5