about summary refs log tree commit diff
path: root/src/libcore/num
diff options
context:
space:
mode:
authorPatrick Walton <pcwalton@mimiga.net>2013-03-22 14:00:15 -0700
committerPatrick Walton <pcwalton@mimiga.net>2013-03-22 22:24:35 -0700
commit85c9fc6f8f59c146c44aacb4b9abfb2c35e16089 (patch)
tree888af920d60f200086d9362c5f8dccd24b928ae9 /src/libcore/num
parenteba3367404e9ca6abf84199b5c2dbe51ce6cdbde (diff)
downloadrust-85c9fc6f8f59c146c44aacb4b9abfb2c35e16089.tar.gz
rust-85c9fc6f8f59c146c44aacb4b9abfb2c35e16089.zip
librustc: Remove the `const` declaration form everywhere
Diffstat (limited to 'src/libcore/num')
-rw-r--r--src/libcore/num/cmath.rs136
-rw-r--r--src/libcore/num/f32.rs36
-rw-r--r--src/libcore/num/f64.rs52
-rw-r--r--src/libcore/num/float.rs36
-rw-r--r--src/libcore/num/int-template.rs8
-rw-r--r--src/libcore/num/int-template/i16.rs2
-rw-r--r--src/libcore/num/int-template/i32.rs2
-rw-r--r--src/libcore/num/int-template/i64.rs2
-rw-r--r--src/libcore/num/int-template/i8.rs2
-rw-r--r--src/libcore/num/int-template/int.rs2
-rw-r--r--src/libcore/num/strconv.rs6
-rw-r--r--src/libcore/num/uint-template.rs8
-rw-r--r--src/libcore/num/uint-template/u16.rs2
-rw-r--r--src/libcore/num/uint-template/u32.rs2
-rw-r--r--src/libcore/num/uint-template/u64.rs2
-rw-r--r--src/libcore/num/uint-template/u8.rs2
-rw-r--r--src/libcore/num/uint-template/uint.rs4
17 files changed, 152 insertions, 152 deletions
diff --git a/src/libcore/num/cmath.rs b/src/libcore/num/cmath.rs
index 2f9d4304cba..378ebfa53a0 100644
--- a/src/libcore/num/cmath.rs
+++ b/src/libcore/num/cmath.rs
@@ -174,33 +174,33 @@ pub mod c_float_utils {
 // FIXME obtain machine float/math constants automatically (Issue #1986)
 
 pub mod c_float_targ_consts {
-    pub const radix: uint = 2u;
-    pub const mantissa_digits: uint = 24u;
-    pub const digits: uint = 6u;
-    pub const min_exp: uint = -125u;
-    pub const max_exp: uint = 128u;
-    pub const min_10_exp: int = -37;
-    pub const max_10_exp: int = 38;
-    // FIXME (#1433): this is wrong, replace with hexadecimal (%a) constants
+    pub static radix: uint = 2u;
+    pub static mantissa_digits: uint = 24u;
+    pub static digits: uint = 6u;
+    pub static min_exp: uint = -125u;
+    pub static max_exp: uint = 128u;
+    pub static min_10_exp: int = -37;
+    pub static max_10_exp: int = 38;
+    // FIXME (#1433): this is wrong, replace with hexadecimal (%a) staticants
     // below.
-    pub const min_value: f32 = 1.175494e-38_f32;
-    pub const max_value: f32 = 3.402823e+38_f32;
-    pub const epsilon: f32 = 0.000000_f32;
+    pub static min_value: f32 = 1.175494e-38_f32;
+    pub static max_value: f32 = 3.402823e+38_f32;
+    pub static epsilon: f32 = 0.000000_f32;
 }
 
 pub mod c_double_targ_consts {
-    pub const radix: uint = 2u;
-    pub const mantissa_digits: uint = 53u;
-    pub const digits: uint = 15u;
-    pub const min_exp: uint = -1021u;
-    pub const max_exp: uint = 1024u;
-    pub const min_10_exp: int = -307;
-    pub const max_10_exp: int = 308;
-    // FIXME (#1433): this is wrong, replace with hexadecimal (%a) constants
+    pub static radix: uint = 2u;
+    pub static mantissa_digits: uint = 53u;
+    pub static digits: uint = 15u;
+    pub static min_exp: uint = -1021u;
+    pub static max_exp: uint = 1024u;
+    pub static min_10_exp: int = -307;
+    pub static max_10_exp: int = 308;
+    // FIXME (#1433): this is wrong, replace with hexadecimal (%a) staticants
     // below.
-    pub const min_value: f64 = 2.225074e-308_f64;
-    pub const max_value: f64 = 1.797693e+308_f64;
-    pub const epsilon: f64 = 2.220446e-16_f64;
+    pub static min_value: f64 = 2.225074e-308_f64;
+    pub static max_value: f64 = 1.797693e+308_f64;
+    pub static epsilon: f64 = 2.220446e-16_f64;
 }
 
 /*
@@ -208,61 +208,61 @@ pub mod c_double_targ_consts {
 FIXME use these once they can be parsed (see Issue #1433)
 
 pub mod c_float_math_consts {
-    pub const pi: c_float = 0x1.921fb6p+1_f32;
-    pub const div_1_pi: c_float = 0x1.45f306p-2_f32;
-    pub const div_2_pi: c_float = 0x1.45f306p-1_f32;
-    pub const div_pi_2: c_float = 0x1.921fb6p+0_f32;
-    pub const div_pi_4: c_float = 0x1.921fb6p-1_f32;
-    pub const div_2_sqrtpi: c_float = 0x1.20dd76p+0_f32;
-    pub const e: c_float = 0x1.5bf0a8p+1_f32;
-    pub const log2_e: c_float = 0x1.715476p+0_f32;
-    pub const log10_e: c_float = 0x1.bcb7b2p-2_f32;
-    pub const ln_2: c_float = 0x1.62e43p-1_f32;
-    pub const ln_10: c_float = 0x1.26bb1cp+1_f32;
-    pub const sqrt2: c_float = 0x1.6a09e6p+0_f32;
-    pub const div_1_sqrt2: c_float = 0x1.6a09e6p-1_f32;
+    pub static pi: c_float = 0x1.921fb6p+1_f32;
+    pub static div_1_pi: c_float = 0x1.45f306p-2_f32;
+    pub static div_2_pi: c_float = 0x1.45f306p-1_f32;
+    pub static div_pi_2: c_float = 0x1.921fb6p+0_f32;
+    pub static div_pi_4: c_float = 0x1.921fb6p-1_f32;
+    pub static div_2_sqrtpi: c_float = 0x1.20dd76p+0_f32;
+    pub static e: c_float = 0x1.5bf0a8p+1_f32;
+    pub static log2_e: c_float = 0x1.715476p+0_f32;
+    pub static log10_e: c_float = 0x1.bcb7b2p-2_f32;
+    pub static ln_2: c_float = 0x1.62e43p-1_f32;
+    pub static ln_10: c_float = 0x1.26bb1cp+1_f32;
+    pub static sqrt2: c_float = 0x1.6a09e6p+0_f32;
+    pub static div_1_sqrt2: c_float = 0x1.6a09e6p-1_f32;
 }
 
 pub mod c_double_math_consts {
-    pub const pi: c_double = 0x1.921fb54442d18p+1_f64;
-    pub const div_1_pi: c_double = 0x1.45f306dc9c883p-2_f64;
-    pub const div_2_pi: c_double = 0x1.45f306dc9c883p-1_f64;
-    pub const div_pi_2: c_double = 0x1.921fb54442d18p+0_f64;
-    pub const div_pi_4: c_double = 0x1.921fb54442d18p-1_f64;
-    pub const div_2_sqrtpi: c_double = 0x1.20dd750429b6dp+0_f64;
-    pub const e: c_double = 0x1.5bf0a8b145769p+1_f64;
-    pub const log2_e: c_double = 0x1.71547652b82fep+0_f64;
-    pub const log10_e: c_double = 0x1.bcb7b1526e50ep-2_f64;
-    pub const ln_2: c_double = 0x1.62e42fefa39efp-1_f64;
-    pub const ln_10: c_double = 0x1.26bb1bbb55516p+1_f64;
-    pub const sqrt2: c_double = 0x1.6a09e667f3bcdp+0_f64;
-    pub const div_1_sqrt2: c_double = 0x1.6a09e667f3bcdp-1_f64;
+    pub static pi: c_double = 0x1.921fb54442d18p+1_f64;
+    pub static div_1_pi: c_double = 0x1.45f306dc9c883p-2_f64;
+    pub static div_2_pi: c_double = 0x1.45f306dc9c883p-1_f64;
+    pub static div_pi_2: c_double = 0x1.921fb54442d18p+0_f64;
+    pub static div_pi_4: c_double = 0x1.921fb54442d18p-1_f64;
+    pub static div_2_sqrtpi: c_double = 0x1.20dd750429b6dp+0_f64;
+    pub static e: c_double = 0x1.5bf0a8b145769p+1_f64;
+    pub static log2_e: c_double = 0x1.71547652b82fep+0_f64;
+    pub static log10_e: c_double = 0x1.bcb7b1526e50ep-2_f64;
+    pub static ln_2: c_double = 0x1.62e42fefa39efp-1_f64;
+    pub static ln_10: c_double = 0x1.26bb1bbb55516p+1_f64;
+    pub static sqrt2: c_double = 0x1.6a09e667f3bcdp+0_f64;
+    pub static div_1_sqrt2: c_double = 0x1.6a09e667f3bcdp-1_f64;
 }
 
 pub mod c_float_targ_consts {
-    pub const radix: uint = 2u;
-    pub const mantissa_digits: uint = 24u;
-    pub const digits: uint = 6u;
-    pub const min_exp: int = -125;
-    pub const max_exp: int = 128;
-    pub const min_10_exp: int = -37;
-    pub const max_10_exp: int = 38;
-    pub const min_value: c_float = 0x1p-126_f32;
-    pub const max_value: c_float = 0x1.fffffep+127_f32;
-    pub const epsilon: c_float = 0x1p-23_f32;
+    pub static radix: uint = 2u;
+    pub static mantissa_digits: uint = 24u;
+    pub static digits: uint = 6u;
+    pub static min_exp: int = -125;
+    pub static max_exp: int = 128;
+    pub static min_10_exp: int = -37;
+    pub static max_10_exp: int = 38;
+    pub static min_value: c_float = 0x1p-126_f32;
+    pub static max_value: c_float = 0x1.fffffep+127_f32;
+    pub static epsilon: c_float = 0x1p-23_f32;
 }
 
 pub mod c_double_targ_consts {
-    pub const radix: uint = 2u;
-    pub const mantissa_digits: uint = 53u;
-    pub const digits: uint = 15u;
-    pub const min_exp: int = -1021;
-    pub const max_exp: int = 1024;
-    pub const min_10_exp: int = -307;
-    pub const max_10_exp: int = 308;
-    pub const min_value: c_double = 0x1p-1022_f64;
-    pub const max_value: c_double = 0x1.fffffffffffffp+1023_f64;
-    pub const epsilon: c_double = 0x1p-52_f64;
+    pub static radix: uint = 2u;
+    pub static mantissa_digits: uint = 53u;
+    pub static digits: uint = 15u;
+    pub static min_exp: int = -1021;
+    pub static max_exp: int = 1024;
+    pub static min_10_exp: int = -307;
+    pub static max_10_exp: int = 308;
+    pub static min_value: c_double = 0x1p-1022_f64;
+    pub static max_value: c_double = 0x1.fffffffffffffp+1023_f64;
+    pub static epsilon: c_double = 0x1p-52_f64;
 }
 
 */
diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs
index 719e5620d02..4a8649fb66e 100644
--- a/src/libcore/num/f32.rs
+++ b/src/libcore/num/f32.rs
@@ -102,11 +102,11 @@ delegate!(fn trunc(n: c_float) -> c_float = cmath::c_float_utils::trunc)
 // These are not defined inside consts:: for consistency with
 // the integer types
 
-pub const NaN: f32 = 0.0_f32/0.0_f32;
+pub static NaN: f32 = 0.0_f32/0.0_f32;
 
-pub const infinity: f32 = 1.0_f32/0.0_f32;
+pub static infinity: f32 = 1.0_f32/0.0_f32;
 
-pub const neg_infinity: f32 = -1.0_f32/0.0_f32;
+pub static neg_infinity: f32 = -1.0_f32/0.0_f32;
 
 #[inline(always)]
 pub fn is_NaN(f: f32) -> bool { f != f }
@@ -206,45 +206,45 @@ pub fn is_finite(x: f32) -> bool {
 /* Module: consts */
 pub mod consts {
     // FIXME (requires Issue #1433 to fix): replace with mathematical
-    // constants from cmath.
-    /// Archimedes' constant
-    pub const pi: f32 = 3.14159265358979323846264338327950288_f32;
+    // staticants from cmath.
+    /// Archimedes' staticant
+    pub static pi: f32 = 3.14159265358979323846264338327950288_f32;
 
     /// pi/2.0
-    pub const frac_pi_2: f32 = 1.57079632679489661923132169163975144_f32;
+    pub static frac_pi_2: f32 = 1.57079632679489661923132169163975144_f32;
 
     /// pi/4.0
-    pub const frac_pi_4: f32 = 0.785398163397448309615660845819875721_f32;
+    pub static frac_pi_4: f32 = 0.785398163397448309615660845819875721_f32;
 
     /// 1.0/pi
-    pub const frac_1_pi: f32 = 0.318309886183790671537767526745028724_f32;
+    pub static frac_1_pi: f32 = 0.318309886183790671537767526745028724_f32;
 
     /// 2.0/pi
-    pub const frac_2_pi: f32 = 0.636619772367581343075535053490057448_f32;
+    pub static frac_2_pi: f32 = 0.636619772367581343075535053490057448_f32;
 
     /// 2.0/sqrt(pi)
-    pub const frac_2_sqrtpi: f32 = 1.12837916709551257389615890312154517_f32;
+    pub static frac_2_sqrtpi: f32 = 1.12837916709551257389615890312154517_f32;
 
     /// sqrt(2.0)
-    pub const sqrt2: f32 = 1.41421356237309504880168872420969808_f32;
+    pub static sqrt2: f32 = 1.41421356237309504880168872420969808_f32;
 
     /// 1.0/sqrt(2.0)
-    pub const frac_1_sqrt2: f32 = 0.707106781186547524400844362104849039_f32;
+    pub static frac_1_sqrt2: f32 = 0.707106781186547524400844362104849039_f32;
 
     /// Euler's number
-    pub const e: f32 = 2.71828182845904523536028747135266250_f32;
+    pub static e: f32 = 2.71828182845904523536028747135266250_f32;
 
     /// log2(e)
-    pub const log2_e: f32 = 1.44269504088896340735992468100189214_f32;
+    pub static log2_e: f32 = 1.44269504088896340735992468100189214_f32;
 
     /// log10(e)
-    pub const log10_e: f32 = 0.434294481903251827651128918916605082_f32;
+    pub static log10_e: f32 = 0.434294481903251827651128918916605082_f32;
 
     /// ln(2.0)
-    pub const ln_2: f32 = 0.693147180559945309417232121458176568_f32;
+    pub static ln_2: f32 = 0.693147180559945309417232121458176568_f32;
 
     /// ln(10.0)
-    pub const ln_10: f32 = 2.30258509299404568401799145468436421_f32;
+    pub static ln_10: f32 = 2.30258509299404568401799145468436421_f32;
 }
 
 #[inline(always)]
diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs
index 6a581ddfa94..8107110e977 100644
--- a/src/libcore/num/f64.rs
+++ b/src/libcore/num/f64.rs
@@ -113,27 +113,27 @@ delegate!(fn yn(i: c_int, n: c_double) -> c_double =
 // These are not defined inside consts:: for consistency with
 // the integer types
 
-pub const radix: uint = 2u;
+pub static radix: uint = 2u;
 
-pub const mantissa_digits: uint = 53u;
-pub const digits: uint = 15u;
+pub static mantissa_digits: uint = 53u;
+pub static digits: uint = 15u;
 
-pub const epsilon: f64 = 2.2204460492503131e-16_f64;
+pub static epsilon: f64 = 2.2204460492503131e-16_f64;
 
-pub const min_value: f64 = 2.2250738585072014e-308_f64;
-pub const max_value: f64 = 1.7976931348623157e+308_f64;
+pub static min_value: f64 = 2.2250738585072014e-308_f64;
+pub static max_value: f64 = 1.7976931348623157e+308_f64;
 
-pub const min_exp: int = -1021;
-pub const max_exp: int = 1024;
+pub static min_exp: int = -1021;
+pub static max_exp: int = 1024;
 
-pub const min_10_exp: int = -307;
-pub const max_10_exp: int = 308;
+pub static min_10_exp: int = -307;
+pub static max_10_exp: int = 308;
 
-pub const NaN: f64 = 0.0_f64/0.0_f64;
+pub static NaN: f64 = 0.0_f64/0.0_f64;
 
-pub const infinity: f64 = 1.0_f64/0.0_f64;
+pub static infinity: f64 = 1.0_f64/0.0_f64;
 
-pub const neg_infinity: f64 = -1.0_f64/0.0_f64;
+pub static neg_infinity: f64 = -1.0_f64/0.0_f64;
 
 #[inline(always)]
 pub fn is_NaN(f: f64) -> bool { f != f }
@@ -230,43 +230,43 @@ pub mod consts {
     // FIXME (requires Issue #1433 to fix): replace with mathematical
     // constants from cmath.
     /// Archimedes' constant
-    pub const pi: f64 = 3.14159265358979323846264338327950288_f64;
+    pub static pi: f64 = 3.14159265358979323846264338327950288_f64;
 
     /// pi/2.0
-    pub const frac_pi_2: f64 = 1.57079632679489661923132169163975144_f64;
+    pub static frac_pi_2: f64 = 1.57079632679489661923132169163975144_f64;
 
     /// pi/4.0
-    pub const frac_pi_4: f64 = 0.785398163397448309615660845819875721_f64;
+    pub static frac_pi_4: f64 = 0.785398163397448309615660845819875721_f64;
 
     /// 1.0/pi
-    pub const frac_1_pi: f64 = 0.318309886183790671537767526745028724_f64;
+    pub static frac_1_pi: f64 = 0.318309886183790671537767526745028724_f64;
 
     /// 2.0/pi
-    pub const frac_2_pi: f64 = 0.636619772367581343075535053490057448_f64;
+    pub static frac_2_pi: f64 = 0.636619772367581343075535053490057448_f64;
 
     /// 2.0/sqrt(pi)
-    pub const frac_2_sqrtpi: f64 = 1.12837916709551257389615890312154517_f64;
+    pub static frac_2_sqrtpi: f64 = 1.12837916709551257389615890312154517_f64;
 
     /// sqrt(2.0)
-    pub const sqrt2: f64 = 1.41421356237309504880168872420969808_f64;
+    pub static sqrt2: f64 = 1.41421356237309504880168872420969808_f64;
 
     /// 1.0/sqrt(2.0)
-    pub const frac_1_sqrt2: f64 = 0.707106781186547524400844362104849039_f64;
+    pub static frac_1_sqrt2: f64 = 0.707106781186547524400844362104849039_f64;
 
     /// Euler's number
-    pub const e: f64 = 2.71828182845904523536028747135266250_f64;
+    pub static e: f64 = 2.71828182845904523536028747135266250_f64;
 
     /// log2(e)
-    pub const log2_e: f64 = 1.44269504088896340735992468100189214_f64;
+    pub static log2_e: f64 = 1.44269504088896340735992468100189214_f64;
 
     /// log10(e)
-    pub const log10_e: f64 = 0.434294481903251827651128918916605082_f64;
+    pub static log10_e: f64 = 0.434294481903251827651128918916605082_f64;
 
     /// ln(2.0)
-    pub const ln_2: f64 = 0.693147180559945309417232121458176568_f64;
+    pub static ln_2: f64 = 0.693147180559945309417232121458176568_f64;
 
     /// ln(10.0)
-    pub const ln_10: f64 = 2.30258509299404568401799145468436421_f64;
+    pub static ln_10: f64 = 2.30258509299404568401799145468436421_f64;
 }
 
 #[inline(always)]
diff --git a/src/libcore/num/float.rs b/src/libcore/num/float.rs
index 4e9a1b62b6e..65a846c6db1 100644
--- a/src/libcore/num/float.rs
+++ b/src/libcore/num/float.rs
@@ -41,54 +41,54 @@ pub use f64::{modf, pow, round, sinh, tanh, tgamma, trunc};
 pub use f64::signbit;
 pub use f64::{j0, j1, jn, y0, y1, yn};
 
-pub const NaN: float = 0.0/0.0;
+pub static NaN: float = 0.0/0.0;
 
-pub const infinity: float = 1.0/0.0;
+pub static infinity: float = 1.0/0.0;
 
-pub const neg_infinity: float = -1.0/0.0;
+pub static neg_infinity: float = -1.0/0.0;
 
 /* Module: consts */
 pub mod consts {
     // FIXME (requires Issue #1433 to fix): replace with mathematical
-    // constants from cmath.
-    /// Archimedes' constant
-    pub const pi: float = 3.14159265358979323846264338327950288;
+    // staticants from cmath.
+    /// Archimedes' staticant
+    pub static pi: float = 3.14159265358979323846264338327950288;
 
     /// pi/2.0
-    pub const frac_pi_2: float = 1.57079632679489661923132169163975144;
+    pub static frac_pi_2: float = 1.57079632679489661923132169163975144;
 
     /// pi/4.0
-    pub const frac_pi_4: float = 0.785398163397448309615660845819875721;
+    pub static frac_pi_4: float = 0.785398163397448309615660845819875721;
 
     /// 1.0/pi
-    pub const frac_1_pi: float = 0.318309886183790671537767526745028724;
+    pub static frac_1_pi: float = 0.318309886183790671537767526745028724;
 
     /// 2.0/pi
-    pub const frac_2_pi: float = 0.636619772367581343075535053490057448;
+    pub static frac_2_pi: float = 0.636619772367581343075535053490057448;
 
     /// 2.0/sqrt(pi)
-    pub const frac_2_sqrtpi: float = 1.12837916709551257389615890312154517;
+    pub static frac_2_sqrtpi: float = 1.12837916709551257389615890312154517;
 
     /// sqrt(2.0)
-    pub const sqrt2: float = 1.41421356237309504880168872420969808;
+    pub static sqrt2: float = 1.41421356237309504880168872420969808;
 
     /// 1.0/sqrt(2.0)
-    pub const frac_1_sqrt2: float = 0.707106781186547524400844362104849039;
+    pub static frac_1_sqrt2: float = 0.707106781186547524400844362104849039;
 
     /// Euler's number
-    pub const e: float = 2.71828182845904523536028747135266250;
+    pub static e: float = 2.71828182845904523536028747135266250;
 
     /// log2(e)
-    pub const log2_e: float = 1.44269504088896340735992468100189214;
+    pub static log2_e: float = 1.44269504088896340735992468100189214;
 
     /// log10(e)
-    pub const log10_e: float = 0.434294481903251827651128918916605082;
+    pub static log10_e: float = 0.434294481903251827651128918916605082;
 
     /// ln(2.0)
-    pub const ln_2: float = 0.693147180559945309417232121458176568;
+    pub static ln_2: float = 0.693147180559945309417232121458176568;
 
     /// ln(10.0)
-    pub const ln_10: float = 2.30258509299404568401799145468436421;
+    pub static ln_10: float = 2.30258509299404568401799145468436421;
 }
 
 /*
diff --git a/src/libcore/num/int-template.rs b/src/libcore/num/int-template.rs
index 4d5ac92311e..af56d3e6305 100644
--- a/src/libcore/num/int-template.rs
+++ b/src/libcore/num/int-template.rs
@@ -21,11 +21,11 @@ use prelude::*;
 
 pub use cmp::{min, max};
 
-pub const bits : uint = inst::bits;
-pub const bytes : uint = (inst::bits / 8);
+pub static bits : uint = inst::bits;
+pub static bytes : uint = (inst::bits / 8);
 
-pub const min_value: T = (-1 as T) << (bits - 1);
-pub const max_value: T = min_value - 1 as T;
+pub static min_value: T = (-1 as T) << (bits - 1);
+pub static max_value: T = min_value - 1 as T;
 
 #[inline(always)]
 pub fn add(x: T, y: T) -> T { x + y }
diff --git a/src/libcore/num/int-template/i16.rs b/src/libcore/num/int-template/i16.rs
index 9914807c98f..965b6f86a53 100644
--- a/src/libcore/num/int-template/i16.rs
+++ b/src/libcore/num/int-template/i16.rs
@@ -14,7 +14,7 @@ use num::NumCast;
 
 mod inst {
     pub type T = i16;
-    pub const bits: uint = ::u16::bits;
+    pub static bits: uint = ::u16::bits;
 }
 
 impl NumCast for i16 {
diff --git a/src/libcore/num/int-template/i32.rs b/src/libcore/num/int-template/i32.rs
index c02facd47db..030bc9c3fde 100644
--- a/src/libcore/num/int-template/i32.rs
+++ b/src/libcore/num/int-template/i32.rs
@@ -14,7 +14,7 @@ use num::NumCast;
 
 mod inst {
     pub type T = i32;
-    pub const bits: uint = ::u32::bits;
+    pub static bits: uint = ::u32::bits;
 }
 
 impl NumCast for i32 {
diff --git a/src/libcore/num/int-template/i64.rs b/src/libcore/num/int-template/i64.rs
index c285ba23c27..283de94e9d8 100644
--- a/src/libcore/num/int-template/i64.rs
+++ b/src/libcore/num/int-template/i64.rs
@@ -14,7 +14,7 @@ use num::NumCast;
 
 mod inst {
     pub type T = i64;
-    pub const bits: uint = ::u64::bits;
+    pub static bits: uint = ::u64::bits;
 }
 
 impl NumCast for i64 {
diff --git a/src/libcore/num/int-template/i8.rs b/src/libcore/num/int-template/i8.rs
index 2733a064563..2f2de358337 100644
--- a/src/libcore/num/int-template/i8.rs
+++ b/src/libcore/num/int-template/i8.rs
@@ -14,7 +14,7 @@ use num::NumCast;
 
 mod inst {
     pub type T = i8;
-    pub const bits: uint = ::u8::bits;
+    pub static bits: uint = ::u8::bits;
 }
 
 impl NumCast for i8 {
diff --git a/src/libcore/num/int-template/int.rs b/src/libcore/num/int-template/int.rs
index 29e1e52348e..3c89492c7e4 100644
--- a/src/libcore/num/int-template/int.rs
+++ b/src/libcore/num/int-template/int.rs
@@ -16,7 +16,7 @@ pub use self::inst::pow;
 
 mod inst {
     pub type T = int;
-    pub const bits: uint = ::uint::bits;
+    pub static bits: uint = ::uint::bits;
 
     /// Returns `base` raised to the power of `exponent`
     pub fn pow(base: int, exponent: uint) -> int {
diff --git a/src/libcore/num/strconv.rs b/src/libcore/num/strconv.rs
index e39d52d86f2..26f0582bfb2 100644
--- a/src/libcore/num/strconv.rs
+++ b/src/libcore/num/strconv.rs
@@ -394,9 +394,9 @@ pub fn to_str_common<T:NumCast+Zero+One+Eq+Ord+NumStrConv+Copy+
 
 // Some constants for from_str_bytes_common's input validation,
 // they define minimum radix values for which the character is a valid digit.
-priv const DIGIT_P_RADIX: uint = ('p' as uint) - ('a' as uint) + 11u;
-priv const DIGIT_I_RADIX: uint = ('i' as uint) - ('a' as uint) + 11u;
-priv const DIGIT_E_RADIX: uint = ('e' as uint) - ('a' as uint) + 11u;
+priv static DIGIT_P_RADIX: uint = ('p' as uint) - ('a' as uint) + 11u;
+priv static DIGIT_I_RADIX: uint = ('i' as uint) - ('a' as uint) + 11u;
+priv static DIGIT_E_RADIX: uint = ('e' as uint) - ('a' as uint) + 11u;
 
 /**
  * Parses a byte slice as a number. This is meant to
diff --git a/src/libcore/num/uint-template.rs b/src/libcore/num/uint-template.rs
index b8e713ff3ab..41d90cc2482 100644
--- a/src/libcore/num/uint-template.rs
+++ b/src/libcore/num/uint-template.rs
@@ -23,11 +23,11 @@ use prelude::*;
 
 pub use cmp::{min, max};
 
-pub const bits : uint = inst::bits;
-pub const bytes : uint = (inst::bits / 8);
+pub static bits : uint = inst::bits;
+pub static bytes : uint = (inst::bits / 8);
 
-pub const min_value: T = 0 as T;
-pub const max_value: T = 0 as T - 1 as T;
+pub static min_value: T = 0 as T;
+pub static max_value: T = 0 as T - 1 as T;
 
 #[inline(always)]
 pub fn add(x: T, y: T) -> T { x + y }
diff --git a/src/libcore/num/uint-template/u16.rs b/src/libcore/num/uint-template/u16.rs
index bdd95120136..c73313ac0f3 100644
--- a/src/libcore/num/uint-template/u16.rs
+++ b/src/libcore/num/uint-template/u16.rs
@@ -16,7 +16,7 @@ mod inst {
     pub type T = u16;
     #[allow(non_camel_case_types)]
     pub type T_SIGNED = i16;
-    pub const bits: uint = 16;
+    pub static bits: uint = 16;
 }
 
 impl NumCast for u16 {
diff --git a/src/libcore/num/uint-template/u32.rs b/src/libcore/num/uint-template/u32.rs
index 7bef51489f2..eb63f1a370a 100644
--- a/src/libcore/num/uint-template/u32.rs
+++ b/src/libcore/num/uint-template/u32.rs
@@ -16,7 +16,7 @@ mod inst {
     pub type T = u32;
     #[allow(non_camel_case_types)]
     pub type T_SIGNED = i32;
-    pub const bits: uint = 32;
+    pub static bits: uint = 32;
 }
 
 impl NumCast for u32 {
diff --git a/src/libcore/num/uint-template/u64.rs b/src/libcore/num/uint-template/u64.rs
index fecafe37f3d..799421dc976 100644
--- a/src/libcore/num/uint-template/u64.rs
+++ b/src/libcore/num/uint-template/u64.rs
@@ -16,7 +16,7 @@ mod inst {
     pub type T = u64;
     #[allow(non_camel_case_types)]
     pub type T_SIGNED = i64;
-    pub const bits: uint = 64;
+    pub static bits: uint = 64;
 }
 
 impl NumCast for u64 {
diff --git a/src/libcore/num/uint-template/u8.rs b/src/libcore/num/uint-template/u8.rs
index 0d48de67334..b173d29510c 100644
--- a/src/libcore/num/uint-template/u8.rs
+++ b/src/libcore/num/uint-template/u8.rs
@@ -18,7 +18,7 @@ mod inst {
     pub type T = u8;
     #[allow(non_camel_case_types)]
     pub type T_SIGNED = i8;
-    pub const bits: uint = 8;
+    pub static bits: uint = 8;
 
     // Type-specific functions here. These must be reexported by the
     // parent module so that they appear in core::u8 and not core::u8::u8;
diff --git a/src/libcore/num/uint-template/uint.rs b/src/libcore/num/uint-template/uint.rs
index f3f27a4e48a..741e0f36a33 100644
--- a/src/libcore/num/uint-template/uint.rs
+++ b/src/libcore/num/uint-template/uint.rs
@@ -28,10 +28,10 @@ pub mod inst {
     #[cfg(target_arch = "x86")]
     #[cfg(target_arch = "arm")]
     #[cfg(target_arch = "mips")]
-    pub const bits: uint = 32;
+    pub static bits: uint = 32;
 
     #[cfg(target_arch = "x86_64")]
-    pub const bits: uint = 64;
+    pub static bits: uint = 64;
 
     /**
     * Divide two numbers, return the result, rounded up.