diff options
| author | Brian Anderson <banderson@mozilla.com> | 2015-01-25 19:03:10 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2015-01-25 22:14:06 -0800 |
| commit | d179ba3b8eb65c951b68f6c52da3aba82806a3a1 (patch) | |
| tree | fa8b3475117a5d145a48f200b44f75eebf9f1b9b /src/libcore/num | |
| parent | de5498650a4702a9552951d28f344229f37e7ae3 (diff) | |
| parent | c80e556e159af38f86eea5ee2ba796d7c724c92b (diff) | |
| download | rust-d179ba3b8eb65c951b68f6c52da3aba82806a3a1.tar.gz rust-d179ba3b8eb65c951b68f6c52da3aba82806a3a1.zip | |
Merge remote-tracking branch 'rust-lang/master'
Conflicts: src/libcore/cmp.rs src/libcore/fmt/mod.rs src/libcore/iter.rs src/libcore/marker.rs src/libcore/num/f32.rs src/libcore/num/f64.rs src/libcore/result.rs src/libcore/str/mod.rs src/librustc/lint/builtin.rs src/librustc/lint/context.rs src/libstd/sync/mpsc/mod.rs src/libstd/sync/poison.rs
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/f32.rs | 6 | ||||
| -rw-r--r-- | src/libcore/num/f64.rs | 6 | ||||
| -rw-r--r-- | src/libcore/num/mod.rs | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs index 9aace310443..83d070feb8a 100644 --- a/src/libcore/num/f32.rs +++ b/src/libcore/num/f32.rs @@ -23,12 +23,12 @@ use num::FpCategory as Fp; use option::Option; #[unstable(feature = "core", reason = "pending integer conventions")] -pub const RADIX: uint = 2u; +pub const RADIX: uint = 2; #[unstable(feature = "core", reason = "pending integer conventions")] -pub const MANTISSA_DIGITS: uint = 24u; +pub const MANTISSA_DIGITS: uint = 24; #[unstable(feature = "core", reason = "pending integer conventions")] -pub const DIGITS: uint = 6u; +pub const DIGITS: uint = 6; #[stable(feature = "rust1", since = "1.0.0")] pub const EPSILON: f32 = 1.19209290e-07_f32; diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs index 3c174b8d4ea..ce011b3c2ee 100644 --- a/src/libcore/num/f64.rs +++ b/src/libcore/num/f64.rs @@ -27,11 +27,11 @@ use option::Option; // members of `Bounded` and `Float`. #[unstable(feature = "core", reason = "pending integer conventions")] -pub const RADIX: uint = 2u; +pub const RADIX: uint = 2; -pub const MANTISSA_DIGITS: uint = 53u; +pub const MANTISSA_DIGITS: uint = 53; #[unstable(feature = "core", reason = "pending integer conventions")] -pub const DIGITS: uint = 15u; +pub const DIGITS: uint = 15; #[stable(feature = "rust1", since = "1.0.0")] pub const EPSILON: f64 = 2.2204460492503131e-16_f64; diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 4f9d7e07488..9e460492b64 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -366,7 +366,7 @@ pub trait Int /// ```rust /// use std::num::Int; /// - /// assert_eq!(2i.pow(4), 16); + /// assert_eq!(2.pow(4), 16); /// ``` #[unstable(feature = "core", reason = "pending integer conventions")] @@ -1196,7 +1196,7 @@ impl_from_primitive! { f64, to_f64 } /// ``` /// use std::num; /// -/// let twenty: f32 = num::cast(0x14i).unwrap(); +/// let twenty: f32 = num::cast(0x14).unwrap(); /// assert_eq!(twenty, 20f32); /// ``` /// @@ -1607,8 +1607,8 @@ macro_rules! from_str_radix_float_impl { let exp = match exp_info { Some((c, offset)) => { let base = match c { - 'E' | 'e' if radix == 10 => 10u as $T, - 'P' | 'p' if radix == 16 => 2u as $T, + 'E' | 'e' if radix == 10 => 10.0, + 'P' | 'p' if radix == 16 => 2.0, _ => return None, }; |
