diff options
| author | Brian Anderson <banderson@mozilla.com> | 2015-01-22 18:22:03 -0800 |
|---|---|---|
| committer | Brian Anderson <banderson@mozilla.com> | 2015-01-23 13:28:40 -0800 |
| commit | cd6d9eab5d75584edfcae4ffdef8b0836db80c1e (patch) | |
| tree | fff2c174986eaab33f67390d0a114d508966fe68 /src/libcore/num | |
| parent | f86bcc1543cb053363c5e6818a2ad44877ea8361 (diff) | |
| download | rust-cd6d9eab5d75584edfcae4ffdef8b0836db80c1e.tar.gz rust-cd6d9eab5d75584edfcae4ffdef8b0836db80c1e.zip | |
Set unstable feature names appropriately
* `core` - for the core crate * `hash` - hashing * `io` - io * `path` - path * `alloc` - alloc crate * `rand` - rand crate * `collections` - collections crate * `std_misc` - other parts of std * `test` - test crate * `rustc_private` - everything else
Diffstat (limited to 'src/libcore/num')
| -rw-r--r-- | src/libcore/num/f32.rs | 18 | ||||
| -rw-r--r-- | src/libcore/num/f64.rs | 16 | ||||
| -rw-r--r-- | src/libcore/num/int_macros.rs | 4 | ||||
| -rw-r--r-- | src/libcore/num/mod.rs | 72 | ||||
| -rw-r--r-- | src/libcore/num/uint_macros.rs | 4 |
5 files changed, 57 insertions, 57 deletions
diff --git a/src/libcore/num/f32.rs b/src/libcore/num/f32.rs index 4d5a0c1af4d..8e28bb18aef 100644 --- a/src/libcore/num/f32.rs +++ b/src/libcore/num/f32.rs @@ -22,12 +22,12 @@ use num::Float; use num::FpCategory as Fp; use option::Option; -#[unstable(feature = "unnamed_feature", reason = "pending integer conventions")] +#[unstable(feature = "core", reason = "pending integer conventions")] pub const RADIX: uint = 2u; -#[unstable(feature = "unnamed_feature", reason = "pending integer conventions")] +#[unstable(feature = "core", reason = "pending integer conventions")] pub const MANTISSA_DIGITS: uint = 24u; -#[unstable(feature = "unnamed_feature", reason = "pending integer conventions")] +#[unstable(feature = "core", reason = "pending integer conventions")] pub const DIGITS: uint = 6u; #[stable(feature = "grandfathered", since = "1.0.0")] @@ -43,14 +43,14 @@ pub const MIN_POS_VALUE: f32 = 1.17549435e-38_f32; #[stable(feature = "grandfathered", since = "1.0.0")] pub const MAX_VALUE: f32 = 3.40282347e+38_f32; -#[unstable(feature = "unnamed_feature", reason = "pending integer conventions")] +#[unstable(feature = "core", reason = "pending integer conventions")] pub const MIN_EXP: int = -125; -#[unstable(feature = "unnamed_feature", reason = "pending integer conventions")] +#[unstable(feature = "core", reason = "pending integer conventions")] pub const MAX_EXP: int = 128; -#[unstable(feature = "unnamed_feature", reason = "pending integer conventions")] +#[unstable(feature = "core", reason = "pending integer conventions")] pub const MIN_10_EXP: int = -37; -#[unstable(feature = "unnamed_feature", reason = "pending integer conventions")] +#[unstable(feature = "core", reason = "pending integer conventions")] pub const MAX_10_EXP: int = 38; #[stable(feature = "grandfathered", since = "1.0.0")] @@ -61,7 +61,7 @@ pub const INFINITY: f32 = 1.0_f32/0.0_f32; pub const NEG_INFINITY: f32 = -1.0_f32/0.0_f32; /// Various useful constants. -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "core", reason = "naming scheme needs to be revisited")] pub mod consts { // FIXME: replace with mathematical constants from cmath. @@ -118,7 +118,7 @@ pub mod consts { pub const LN_10: f32 = 2.30258509299404568401799145468436421_f32; } -#[unstable(feature = "unnamed_feature", reason = "trait is unstable")] +#[unstable(feature = "core", reason = "trait is unstable")] impl Float for f32 { #[inline] fn nan() -> f32 { NAN } diff --git a/src/libcore/num/f64.rs b/src/libcore/num/f64.rs index 84a457d78ca..4fee89e923c 100644 --- a/src/libcore/num/f64.rs +++ b/src/libcore/num/f64.rs @@ -26,11 +26,11 @@ use option::Option; // constants are implemented in favour of referencing the respective // members of `Bounded` and `Float`. -#[unstable(feature = "unnamed_feature", reason = "pending integer conventions")] +#[unstable(feature = "core", reason = "pending integer conventions")] pub const RADIX: uint = 2u; pub const MANTISSA_DIGITS: uint = 53u; -#[unstable(feature = "unnamed_feature", reason = "pending integer conventions")] +#[unstable(feature = "core", reason = "pending integer conventions")] pub const DIGITS: uint = 15u; #[stable(feature = "grandfathered", since = "1.0.0")] @@ -46,14 +46,14 @@ pub const MIN_POS_VALUE: f64 = 2.2250738585072014e-308_f64; #[stable(feature = "grandfathered", since = "1.0.0")] pub const MAX_VALUE: f64 = 1.7976931348623157e+308_f64; -#[unstable(feature = "unnamed_feature", reason = "pending integer conventions")] +#[unstable(feature = "core", reason = "pending integer conventions")] pub const MIN_EXP: int = -1021; -#[unstable(feature = "unnamed_feature", reason = "pending integer conventions")] +#[unstable(feature = "core", reason = "pending integer conventions")] pub const MAX_EXP: int = 1024; -#[unstable(feature = "unnamed_feature", reason = "pending integer conventions")] +#[unstable(feature = "core", reason = "pending integer conventions")] pub const MIN_10_EXP: int = -307; -#[unstable(feature = "unnamed_feature", reason = "pending integer conventions")] +#[unstable(feature = "core", reason = "pending integer conventions")] pub const MAX_10_EXP: int = 308; #[stable(feature = "grandfathered", since = "1.0.0")] @@ -64,7 +64,7 @@ pub const INFINITY: f64 = 1.0_f64/0.0_f64; pub const NEG_INFINITY: f64 = -1.0_f64/0.0_f64; /// Various useful constants. -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "core", reason = "naming scheme needs to be revisited")] pub mod consts { // FIXME: replace with mathematical constants from cmath. @@ -125,7 +125,7 @@ pub mod consts { pub const LN_10: f64 = 2.30258509299404568401799145468436421_f64; } -#[unstable(feature = "unnamed_feature", reason = "trait is unstable")] +#[unstable(feature = "core", reason = "trait is unstable")] impl Float for f64 { #[inline] fn nan() -> f64 { NAN } diff --git a/src/libcore/num/int_macros.rs b/src/libcore/num/int_macros.rs index af84f619a9d..899f08fb622 100644 --- a/src/libcore/num/int_macros.rs +++ b/src/libcore/num/int_macros.rs @@ -14,11 +14,11 @@ macro_rules! int_module { ($T:ty, $bits:expr) => ( // FIXME(#11621): Should be deprecated once CTFE is implemented in favour of // calling the `mem::size_of` function. -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "core")] pub const BITS : uint = $bits; // FIXME(#11621): Should be deprecated once CTFE is implemented in favour of // calling the `mem::size_of` function. -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "core")] pub const BYTES : uint = ($bits / 8); // FIXME(#11621): Should be deprecated once CTFE is implemented in favour of diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 2321baf3780..5e4956dfccf 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -50,25 +50,25 @@ pub trait Int { /// Returns the `0` value of this integer type. // FIXME (#5527): Should be an associated constant - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "unsure about its place in the world")] fn zero() -> Self; /// Returns the `1` value of this integer type. // FIXME (#5527): Should be an associated constant - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "unsure about its place in the world")] fn one() -> Self; /// Returns the smallest value that can be represented by this integer type. // FIXME (#5527): Should be and associated constant - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "unsure about its place in the world")] fn min_value() -> Self; /// Returns the largest value that can be represented by this integer type. // FIXME (#5527): Should be and associated constant - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "unsure about its place in the world")] fn max_value() -> Self; @@ -83,7 +83,7 @@ pub trait Int /// /// assert_eq!(n.count_ones(), 3); /// ``` - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "pending integer conventions")] fn count_ones(self) -> uint; @@ -98,7 +98,7 @@ pub trait Int /// /// assert_eq!(n.count_zeros(), 5); /// ``` - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "pending integer conventions")] #[inline] fn count_zeros(self) -> uint { @@ -117,7 +117,7 @@ pub trait Int /// /// assert_eq!(n.leading_zeros(), 10); /// ``` - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "pending integer conventions")] fn leading_zeros(self) -> uint; @@ -133,7 +133,7 @@ pub trait Int /// /// assert_eq!(n.trailing_zeros(), 3); /// ``` - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "pending integer conventions")] fn trailing_zeros(self) -> uint; @@ -150,7 +150,7 @@ pub trait Int /// /// assert_eq!(n.rotate_left(12), m); /// ``` - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "pending integer conventions")] fn rotate_left(self, n: uint) -> Self; @@ -167,7 +167,7 @@ pub trait Int /// /// assert_eq!(n.rotate_right(12), m); /// ``` - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "pending integer conventions")] fn rotate_right(self, n: uint) -> Self; @@ -368,7 +368,7 @@ pub trait Int /// /// assert_eq!(2i.pow(4), 16); /// ``` - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "pending integer conventions")] #[inline] fn pow(self, mut exp: uint) -> Self { @@ -632,7 +632,7 @@ pub trait SignedInt { /// Computes the absolute value of `self`. `Int::min_value()` will be /// returned if the number is `Int::min_value()`. - #[unstable(feature = "unnamed_feature", reason = "overflow in debug builds?")] + #[unstable(feature = "core", reason = "overflow in debug builds?")] fn abs(self) -> Self; /// Returns a number representing sign of `self`. @@ -737,7 +737,7 @@ impl UnsignedInt for u32 {} impl UnsignedInt for u64 {} /// A generic trait for converting a value to a number. -#[unstable(feature = "unnamed_feature", reason = "trait is likely to be removed")] +#[unstable(feature = "core", reason = "trait is likely to be removed")] pub trait ToPrimitive { /// Converts the value of `self` to an `int`. #[inline] @@ -1002,7 +1002,7 @@ impl_to_primitive_float! { f32 } impl_to_primitive_float! { f64 } /// A generic trait for converting a number to a value. -#[unstable(feature = "unnamed_feature", reason = "trait is likely to be removed")] +#[unstable(feature = "core", reason = "trait is likely to be removed")] pub trait FromPrimitive : ::marker::Sized { /// Convert an `int` to return an optional value of this type. If the /// value cannot be represented by this value, the `None` is returned. @@ -1084,73 +1084,73 @@ pub trait FromPrimitive : ::marker::Sized { } /// A utility function that just calls `FromPrimitive::from_int`. -#[unstable(feature = "unnamed_feature", reason = "likely to be removed")] +#[unstable(feature = "core", reason = "likely to be removed")] pub fn from_int<A: FromPrimitive>(n: int) -> Option<A> { FromPrimitive::from_int(n) } /// A utility function that just calls `FromPrimitive::from_i8`. -#[unstable(feature = "unnamed_feature", reason = "likely to be removed")] +#[unstable(feature = "core", reason = "likely to be removed")] pub fn from_i8<A: FromPrimitive>(n: i8) -> Option<A> { FromPrimitive::from_i8(n) } /// A utility function that just calls `FromPrimitive::from_i16`. -#[unstable(feature = "unnamed_feature", reason = "likely to be removed")] +#[unstable(feature = "core", reason = "likely to be removed")] pub fn from_i16<A: FromPrimitive>(n: i16) -> Option<A> { FromPrimitive::from_i16(n) } /// A utility function that just calls `FromPrimitive::from_i32`. -#[unstable(feature = "unnamed_feature", reason = "likely to be removed")] +#[unstable(feature = "core", reason = "likely to be removed")] pub fn from_i32<A: FromPrimitive>(n: i32) -> Option<A> { FromPrimitive::from_i32(n) } /// A utility function that just calls `FromPrimitive::from_i64`. -#[unstable(feature = "unnamed_feature", reason = "likely to be removed")] +#[unstable(feature = "core", reason = "likely to be removed")] pub fn from_i64<A: FromPrimitive>(n: i64) -> Option<A> { FromPrimitive::from_i64(n) } /// A utility function that just calls `FromPrimitive::from_uint`. -#[unstable(feature = "unnamed_feature", reason = "likely to be removed")] +#[unstable(feature = "core", reason = "likely to be removed")] pub fn from_uint<A: FromPrimitive>(n: uint) -> Option<A> { FromPrimitive::from_uint(n) } /// A utility function that just calls `FromPrimitive::from_u8`. -#[unstable(feature = "unnamed_feature", reason = "likely to be removed")] +#[unstable(feature = "core", reason = "likely to be removed")] pub fn from_u8<A: FromPrimitive>(n: u8) -> Option<A> { FromPrimitive::from_u8(n) } /// A utility function that just calls `FromPrimitive::from_u16`. -#[unstable(feature = "unnamed_feature", reason = "likely to be removed")] +#[unstable(feature = "core", reason = "likely to be removed")] pub fn from_u16<A: FromPrimitive>(n: u16) -> Option<A> { FromPrimitive::from_u16(n) } /// A utility function that just calls `FromPrimitive::from_u32`. -#[unstable(feature = "unnamed_feature", reason = "likely to be removed")] +#[unstable(feature = "core", reason = "likely to be removed")] pub fn from_u32<A: FromPrimitive>(n: u32) -> Option<A> { FromPrimitive::from_u32(n) } /// A utility function that just calls `FromPrimitive::from_u64`. -#[unstable(feature = "unnamed_feature", reason = "likely to be removed")] +#[unstable(feature = "core", reason = "likely to be removed")] pub fn from_u64<A: FromPrimitive>(n: u64) -> Option<A> { FromPrimitive::from_u64(n) } /// A utility function that just calls `FromPrimitive::from_f32`. -#[unstable(feature = "unnamed_feature", reason = "likely to be removed")] +#[unstable(feature = "core", reason = "likely to be removed")] pub fn from_f32<A: FromPrimitive>(n: f32) -> Option<A> { FromPrimitive::from_f32(n) } /// A utility function that just calls `FromPrimitive::from_f64`. -#[unstable(feature = "unnamed_feature", reason = "likely to be removed")] +#[unstable(feature = "core", reason = "likely to be removed")] pub fn from_f64<A: FromPrimitive>(n: f64) -> Option<A> { FromPrimitive::from_f64(n) } @@ -1201,13 +1201,13 @@ impl_from_primitive! { f64, to_f64 } /// ``` /// #[inline] -#[unstable(feature = "unnamed_feature", reason = "likely to be removed")] +#[unstable(feature = "core", reason = "likely to be removed")] pub fn cast<T: NumCast,U: NumCast>(n: T) -> Option<U> { NumCast::from(n) } /// An interface for casting between machine scalars. -#[unstable(feature = "unnamed_feature", reason = "trait is likely to be removed")] +#[unstable(feature = "core", reason = "trait is likely to be removed")] pub trait NumCast: ToPrimitive { /// Creates a number from another value that can be converted into a primitive via the /// `ToPrimitive` trait. @@ -1242,7 +1242,7 @@ impl_num_cast! { f64, to_f64 } /// Used for representing the classification of floating point numbers #[derive(Copy, PartialEq, Show)] -#[unstable(feature = "unnamed_feature", reason = "may be renamed")] +#[unstable(feature = "core", reason = "may be renamed")] pub enum FpCategory { /// "Not a Number", often obtained by dividing by zero Nan, @@ -1262,7 +1262,7 @@ pub enum FpCategory { // // FIXME(#8888): Several of these functions have a parameter named // `unused_self`. Removing it requires #8888 to be fixed. -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "core", reason = "distribution of methods between core/std is unclear")] pub trait Float : Copy + Clone @@ -1418,20 +1418,20 @@ pub trait Float } /// A generic trait for converting a string with a radix (base) to a value -#[unstable(feature = "unnamed_feature", reason = "might need to return Result")] +#[unstable(feature = "core", reason = "might need to return Result")] pub trait FromStrRadix { fn from_str_radix(str: &str, radix: uint) -> Option<Self>; } /// A utility function that just calls FromStrRadix::from_str_radix. -#[unstable(feature = "unnamed_feature", reason = "might need to return Result")] +#[unstable(feature = "core", reason = "might need to return Result")] pub fn from_str_radix<T: FromStrRadix>(str: &str, radix: uint) -> Option<T> { FromStrRadix::from_str_radix(str, radix) } macro_rules! from_str_radix_float_impl { ($T:ty) => { - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "might need to return Result")] impl FromStr for $T { /// Convert a string in base 10 to a float. @@ -1465,7 +1465,7 @@ macro_rules! from_str_radix_float_impl { } } - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "might need to return Result")] impl FromStrRadix for $T { /// Convert a string in a given base to a float. @@ -1630,7 +1630,7 @@ from_str_radix_float_impl! { f64 } macro_rules! from_str_radix_int_impl { ($T:ty) => { - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "might need to return Result")] impl FromStr for $T { #[inline] @@ -1639,7 +1639,7 @@ macro_rules! from_str_radix_int_impl { } } - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "core", reason = "might need to return Result")] impl FromStrRadix for $T { fn from_str_radix(src: &str, radix: uint) -> Option<$T> { diff --git a/src/libcore/num/uint_macros.rs b/src/libcore/num/uint_macros.rs index c584fc90557..c18333892d9 100644 --- a/src/libcore/num/uint_macros.rs +++ b/src/libcore/num/uint_macros.rs @@ -12,9 +12,9 @@ macro_rules! uint_module { ($T:ty, $T_SIGNED:ty, $bits:expr) => ( -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "core")] pub const BITS : uint = $bits; -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "core")] pub const BYTES : uint = ($bits / 8); #[stable(feature = "grandfathered", since = "1.0.0")] |
