about summary refs log tree commit diff
path: root/src/libcore/num
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-11-16 19:54:28 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2015-11-18 01:24:21 +0300
commit7e2ffc7090a70fe8c77a0e03fcec3cb1387141f2 (patch)
tree63f67955eac7b8d88a7a771a958948500d4d9f15 /src/libcore/num
parent52acc05f6398d70e8cc506e19bb9fefbed7368ac (diff)
Add missing annotations and some tests
Diffstat (limited to 'src/libcore/num')
-rw-r--r--src/libcore/num/f32.rs3
-rw-r--r--src/libcore/num/f64.rs3
-rw-r--r--src/libcore/num/mod.rs13
3 files changed, 19 insertions, 0 deletions
diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs
index 6185823d001..1261bd0388c 100644
--- a/src/libcore/num/f32.rs
+++ b/src/libcore/num/f32.rs
@@ -141,6 +141,9 @@ pub mod consts {
     pub const LN_10: f32 = 2.30258509299404568401799145468436421_f32;
 }
 
+#[unstable(feature = "core_float",
+           reason = "stable interface is via `impl f{32,64}` in later crates",
+           issue = "27702")]
 impl Float for f32 {
     #[inline]
     fn nan() -> f32 { NAN }
diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs
index f85f8c5bd14..c4a24631552 100644
--- a/src/libcore/num/f64.rs
+++ b/src/libcore/num/f64.rs
@@ -141,6 +141,9 @@ pub mod consts {
     pub const LN_10: f64 = 2.30258509299404568401799145468436421_f64;
 }
 
+#[unstable(feature = "core_float",
+           reason = "stable interface is via `impl f{32,64}` in later crates",
+           issue = "27702")]
 impl Float for f64 {
     #[inline]
     fn nan() -> f64 { NAN }
diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs
index c0f65fea7db..fdff49b1a57 100644
--- a/src/libcore/num/mod.rs
+++ b/src/libcore/num/mod.rs
@@ -77,10 +77,16 @@ pub trait One: Sized {
 
 macro_rules! zero_one_impl {
     ($($t:ty)*) => ($(
+        #[unstable(feature = "zero_one",
+                   reason = "unsure of placement, wants to use associated constants",
+                   issue = "27739")]
         impl Zero for $t {
             #[inline]
             fn zero() -> Self { 0 }
         }
+        #[unstable(feature = "zero_one",
+                   reason = "unsure of placement, wants to use associated constants",
+                   issue = "27739")]
         impl One for $t {
             #[inline]
             fn one() -> Self { 1 }
@@ -91,10 +97,16 @@ zero_one_impl! { u8 u16 u32 u64 usize i8 i16 i32 i64 isize }
 
 macro_rules! zero_one_impl_float {
     ($($t:ty)*) => ($(
+        #[unstable(feature = "zero_one",
+                   reason = "unsure of placement, wants to use associated constants",
+                   issue = "27739")]
         impl Zero for $t {
             #[inline]
             fn zero() -> Self { 0.0 }
         }
+        #[unstable(feature = "zero_one",
+                   reason = "unsure of placement, wants to use associated constants",
+                   issue = "27739")]
         impl One for $t {
             #[inline]
             fn one() -> Self { 1.0 }
@@ -1938,6 +1950,7 @@ impl fmt::Display for ParseIntError {
     }
 }
 
+#[stable(feature = "rust1", since = "1.0.0")]
 pub use num::dec2flt::ParseFloatError;
 
 // Conversion traits for primitive integer and float types