diff options
| author | Oliver 'ker' Schneider <rust19446194516@oli-obk.de> | 2015-06-07 19:50:13 +0200 |
|---|---|---|
| committer | Oliver 'ker' Schneider <rust19446194516@oli-obk.de> | 2015-06-07 19:50:13 +0200 |
| commit | ec078a033bdd2a4d076f78f2e655b8c3e5e4bf6a (patch) | |
| tree | 1ec3554c23443ccc25e44eb90efa4f176fe33df9 /src/libcore/num | |
| parent | 2c8d75d655b7d0bf84178f464c47a79569a35f3c (diff) | |
| download | rust-ec078a033bdd2a4d076f78f2e655b8c3e5e4bf6a.tar.gz rust-ec078a033bdd2a4d076f78f2e655b8c3e5e4bf6a.zip | |
change some statics to constants
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/flt2dec/strategy/dragon.rs | 2 | ||||
| -rw-r--r-- | src/libcore/num/flt2dec/strategy/grisu.rs | 3 |
2 files changed, 1 insertions, 4 deletions
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), } } - |
