From cd6d9eab5d75584edfcae4ffdef8b0836db80c1e Mon Sep 17 00:00:00 2001 From: Brian Anderson Date: Thu, 22 Jan 2015 18:22:03 -0800 Subject: 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 --- src/liballoc/arc.rs | 14 +++++++------- src/liballoc/boxed.rs | 4 ++-- src/liballoc/heap.rs | 2 +- src/liballoc/lib.rs | 6 ++++-- src/liballoc/rc.rs | 28 ++++++++++++++-------------- 5 files changed, 28 insertions(+), 26 deletions(-) (limited to 'src/liballoc') diff --git a/src/liballoc/arc.rs b/src/liballoc/arc.rs index 821933f3f0a..ad4cb2076c2 100644 --- a/src/liballoc/arc.rs +++ b/src/liballoc/arc.rs @@ -126,7 +126,7 @@ unsafe impl Sync for Arc { } /// Weak pointers will not keep the data inside of the `Arc` alive, and can be used to break cycles /// between `Arc` pointers. #[unsafe_no_drop_flag] -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module.")] pub struct Weak { // FIXME #12808: strange name to try to avoid interfering with @@ -180,7 +180,7 @@ impl Arc { /// /// let weak_five = five.downgrade(); /// ``` - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module.")] pub fn downgrade(&self) -> Weak { // See the clone() impl for why this is relaxed @@ -202,12 +202,12 @@ impl Arc { /// Get the number of weak references to this value. #[inline] -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "alloc")] pub fn weak_count(this: &Arc) -> uint { this.inner().weak.load(SeqCst) - 1 } /// Get the number of strong references to this value. #[inline] -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "alloc")] pub fn strong_count(this: &Arc) -> uint { this.inner().strong.load(SeqCst) } #[stable(feature = "grandfathered", since = "1.0.0")] @@ -273,7 +273,7 @@ impl Arc { /// let mut_five = five.make_unique(); /// ``` #[inline] - #[unstable(feature = "unnamed_feature")] + #[unstable(feature = "alloc")] pub fn make_unique(&mut self) -> &mut T { // Note that we hold a strong reference, which also counts as a weak reference, so we only // clone if there is an additional reference of either kind. @@ -357,7 +357,7 @@ impl Drop for Arc { } } -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module.")] impl Weak { /// Upgrades a weak reference to a strong reference. @@ -396,7 +396,7 @@ impl Weak { } } -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module.")] impl Clone for Weak { /// Makes a clone of the `Weak`. diff --git a/src/liballoc/boxed.rs b/src/liballoc/boxed.rs index 7351f1f3306..ed371e577a6 100644 --- a/src/liballoc/boxed.rs +++ b/src/liballoc/boxed.rs @@ -44,7 +44,7 @@ use core::ops::{Deref, DerefMut}; /// } /// ``` #[lang = "exchange_heap"] -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "alloc", reason = "may be renamed; uncertain about custom allocator design")] pub static HEAP: () = (); @@ -126,7 +126,7 @@ impl> Hash for Box { } /// Extension methods for an owning `Any` trait object. -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "alloc", reason = "this trait will likely disappear once compiler bugs blocking \ a direct impl on `Box` have been fixed ")] // FIXME(#18737): this should be a direct impl on `Box`. If you're diff --git a/src/liballoc/heap.rs b/src/liballoc/heap.rs index 19496616a5d..9a72d7d0510 100644 --- a/src/liballoc/heap.rs +++ b/src/liballoc/heap.rs @@ -80,7 +80,7 @@ pub fn usable_size(size: uint, align: uint) -> uint { /// /// These statistics may be inconsistent if other threads use the allocator /// during the call. -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "alloc")] pub fn stats_print() { imp::stats_print(); } diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index c30bd280c8f..cadb8907cf8 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -57,7 +57,7 @@ //! default global allocator. It is not compatible with the libc allocator API. #![crate_name = "alloc"] -#![unstable(feature = "unnamed_feature")] +#![unstable(feature = "alloc")] #![feature(staged_api)] #![staged_api] #![crate_type = "rlib"] @@ -70,8 +70,10 @@ #![feature(lang_items, unsafe_destructor)] #![feature(box_syntax)] #![feature(optin_builtin_traits)] -#![feature(unnamed_feature)] #![allow(unknown_features)] #![feature(int_uint)] +#![feature(core)] +#![feature(hash)] +#![feature(libc)] #[macro_use] extern crate core; diff --git a/src/liballoc/rc.rs b/src/liballoc/rc.rs index 4e3c165361b..81336cfd230 100644 --- a/src/liballoc/rc.rs +++ b/src/liballoc/rc.rs @@ -268,7 +268,7 @@ impl Rc { /// let weak_five = five.downgrade(); /// ``` #[cfg(stage0)] // NOTE remove after next snapshot - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module")] pub fn downgrade(&self) -> Weak { self.inc_weak(); @@ -291,7 +291,7 @@ impl Rc { /// let weak_five = five.downgrade(); /// ``` #[cfg(not(stage0))] // NOTE remove cfg after next snapshot - #[unstable(feature = "unnamed_feature", + #[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module")] pub fn downgrade(&self) -> Weak { self.inc_weak(); @@ -301,12 +301,12 @@ impl Rc { /// Get the number of weak references to this value. #[inline] -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "alloc")] pub fn weak_count(this: &Rc) -> uint { this.weak() - 1 } /// Get the number of strong references to this value. #[inline] -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "alloc")] pub fn strong_count(this: &Rc) -> uint { this.strong() } /// Returns true if there are no other `Rc` or `Weak` values that share the same inner value. @@ -322,7 +322,7 @@ pub fn strong_count(this: &Rc) -> uint { this.strong() } /// rc::is_unique(&five); /// ``` #[inline] -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "alloc")] pub fn is_unique(rc: &Rc) -> bool { weak_count(rc) == 0 && strong_count(rc) == 1 } @@ -344,7 +344,7 @@ pub fn is_unique(rc: &Rc) -> bool { /// assert_eq!(rc::try_unwrap(x), Err(Rc::new(4u))); /// ``` #[inline] -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "alloc")] pub fn try_unwrap(rc: Rc) -> Result> { if is_unique(&rc) { unsafe { @@ -378,7 +378,7 @@ pub fn try_unwrap(rc: Rc) -> Result> { /// assert!(rc::get_mut(&mut x).is_none()); /// ``` #[inline] -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "alloc")] pub fn get_mut<'a, T>(rc: &'a mut Rc) -> Option<&'a mut T> { if is_unique(rc) { let inner = unsafe { &mut **rc._ptr }; @@ -404,7 +404,7 @@ impl Rc { /// let mut_five = five.make_unique(); /// ``` #[inline] - #[unstable(feature = "unnamed_feature")] + #[unstable(feature = "alloc")] pub fn make_unique(&mut self) -> &mut T { if !is_unique(self) { *self = Rc::new((**self).clone()) @@ -695,7 +695,7 @@ impl> Hash for Rc { } } -#[unstable(feature = "unnamed_feature", reason = "Show is experimental.")] +#[unstable(feature = "alloc", reason = "Show is experimental.")] impl fmt::Show for Rc { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Rc({:?})", **self) @@ -716,7 +716,7 @@ impl fmt::String for Rc { /// See the [module level documentation](../index.html) for more. #[unsafe_no_drop_flag] #[cfg(stage0)] // NOTE remove impl after next snapshot -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module.")] pub struct Weak { // FIXME #12808: strange names to try to avoid interfering with @@ -732,7 +732,7 @@ pub struct Weak { /// /// See the [module level documentation](../index.html) for more. #[unsafe_no_drop_flag] -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module.")] #[cfg(not(stage0))] // NOTE remove cfg after next snapshot pub struct Weak { @@ -748,7 +748,7 @@ impl !marker::Send for Weak {} impl !marker::Sync for Weak {} -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module.")] impl Weak { /// Upgrades a weak reference to a strong reference. @@ -850,7 +850,7 @@ impl Drop for Weak { } } -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module.")] impl Clone for Weak { /// Makes a clone of the `Weak`. @@ -894,7 +894,7 @@ impl Clone for Weak { } } -#[unstable(feature = "unnamed_feature", reason = "Show is experimental.")] +#[unstable(feature = "alloc", reason = "Show is experimental.")] impl fmt::Show for Weak { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "(Weak)") -- cgit 1.4.1-3-g733a5