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
This commit is contained in:
Brian Anderson 2015-01-22 18:22:03 -08:00
parent f86bcc1543
commit cd6d9eab5d
148 changed files with 864 additions and 741 deletions

View file

@ -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 }

View file

@ -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 }

View file

@ -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

View file

@ -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> {

View file

@ -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")]