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/liballoc | |
| 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/liballoc')
| -rw-r--r-- | src/liballoc/arc.rs | 14 | ||||
| -rw-r--r-- | src/liballoc/boxed.rs | 4 | ||||
| -rw-r--r-- | src/liballoc/heap.rs | 2 | ||||
| -rw-r--r-- | src/liballoc/lib.rs | 6 | ||||
| -rw-r--r-- | src/liballoc/rc.rs | 28 |
5 files changed, 28 insertions, 26 deletions
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<T: Sync + Send> Sync for Arc<T> { } /// 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<T> { // FIXME #12808: strange name to try to avoid interfering with @@ -180,7 +180,7 @@ impl<T> Arc<T> { /// /// 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<T> { // See the clone() impl for why this is relaxed @@ -202,12 +202,12 @@ impl<T> Arc<T> { /// Get the number of weak references to this value. #[inline] -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "alloc")] pub fn weak_count<T>(this: &Arc<T>) -> 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<T>(this: &Arc<T>) -> uint { this.inner().strong.load(SeqCst) } #[stable(feature = "grandfathered", since = "1.0.0")] @@ -273,7 +273,7 @@ impl<T: Send + Sync + Clone> Arc<T> { /// 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<T: Sync + Send> Drop for Arc<T> { } } -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module.")] impl<T: Sync + Send> Weak<T> { /// Upgrades a weak reference to a strong reference. @@ -396,7 +396,7 @@ impl<T: Sync + Send> Weak<T> { } } -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module.")] impl<T: Sync + Send> Clone for Weak<T> { /// Makes a clone of the `Weak<T>`. 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<S: hash::Hasher, T: ?Sized + Hash<S>> Hash<S> for Box<T> { } /// 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<Any>` have been fixed ")] // FIXME(#18737): this should be a direct impl on `Box<Any>`. 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<T> Rc<T> { /// 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<T> { self.inc_weak(); @@ -291,7 +291,7 @@ impl<T> Rc<T> { /// 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<T> { self.inc_weak(); @@ -301,12 +301,12 @@ impl<T> Rc<T> { /// Get the number of weak references to this value. #[inline] -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "alloc")] pub fn weak_count<T>(this: &Rc<T>) -> 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<T>(this: &Rc<T>) -> uint { this.strong() } /// Returns true if there are no other `Rc` or `Weak<T>` values that share the same inner value. @@ -322,7 +322,7 @@ pub fn strong_count<T>(this: &Rc<T>) -> uint { this.strong() } /// rc::is_unique(&five); /// ``` #[inline] -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "alloc")] pub fn is_unique<T>(rc: &Rc<T>) -> bool { weak_count(rc) == 0 && strong_count(rc) == 1 } @@ -344,7 +344,7 @@ pub fn is_unique<T>(rc: &Rc<T>) -> bool { /// assert_eq!(rc::try_unwrap(x), Err(Rc::new(4u))); /// ``` #[inline] -#[unstable(feature = "unnamed_feature")] +#[unstable(feature = "alloc")] pub fn try_unwrap<T>(rc: Rc<T>) -> Result<T, Rc<T>> { if is_unique(&rc) { unsafe { @@ -378,7 +378,7 @@ pub fn try_unwrap<T>(rc: Rc<T>) -> Result<T, Rc<T>> { /// 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<T>) -> Option<&'a mut T> { if is_unique(rc) { let inner = unsafe { &mut **rc._ptr }; @@ -404,7 +404,7 @@ impl<T: Clone> Rc<T> { /// 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<S: hash::Hasher, T: Hash<S>> Hash<S> for Rc<T> { } } -#[unstable(feature = "unnamed_feature", reason = "Show is experimental.")] +#[unstable(feature = "alloc", reason = "Show is experimental.")] impl<T: fmt::Show> fmt::Show for Rc<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "Rc({:?})", **self) @@ -716,7 +716,7 @@ impl<T: fmt::String> fmt::String for Rc<T> { /// 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<T> { // FIXME #12808: strange names to try to avoid interfering with @@ -732,7 +732,7 @@ pub struct Weak<T> { /// /// 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<T> { @@ -748,7 +748,7 @@ impl<T> !marker::Send for Weak<T> {} impl<T> !marker::Sync for Weak<T> {} -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module.")] impl<T> Weak<T> { /// Upgrades a weak reference to a strong reference. @@ -850,7 +850,7 @@ impl<T> Drop for Weak<T> { } } -#[unstable(feature = "unnamed_feature", +#[unstable(feature = "alloc", reason = "Weak pointers may not belong in this module.")] impl<T> Clone for Weak<T> { /// Makes a clone of the `Weak<T>`. @@ -894,7 +894,7 @@ impl<T> Clone for Weak<T> { } } -#[unstable(feature = "unnamed_feature", reason = "Show is experimental.")] +#[unstable(feature = "alloc", reason = "Show is experimental.")] impl<T: fmt::Show> fmt::Show for Weak<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "(Weak)") |
