Skip to content

Commit cd6d9ea

Browse files
committed
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
1 parent f86bcc1 commit cd6d9ea

File tree

148 files changed

+864
-741
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

148 files changed

+864
-741
lines changed

src/compiletest/compiletest.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
#![feature(slicing_syntax, unboxed_closures)]
1414
#![feature(box_syntax)]
1515
#![feature(int_uint)]
16-
#![feature(unnamed_feature)]
1716

1817
#![deny(warnings)]
1918

src/driver/driver.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
// except according to those terms.
1010

1111
#![allow(unknown_features)]
12-
#![feature(unnamed_feature)]
12+
#![cfg_attr(rustc, feature(rustc_private))]
13+
#![cfg_attr(rustdoc, feature(rustdoc))]
1314

1415
#[cfg(rustdoc)]
1516
extern crate "rustdoc" as this;

src/liballoc/arc.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ unsafe impl<T: Sync + Send> Sync for Arc<T> { }
126126
/// Weak pointers will not keep the data inside of the `Arc` alive, and can be used to break cycles
127127
/// between `Arc` pointers.
128128
#[unsafe_no_drop_flag]
129-
#[unstable(feature = "unnamed_feature",
129+
#[unstable(feature = "alloc",
130130
reason = "Weak pointers may not belong in this module.")]
131131
pub struct Weak<T> {
132132
// FIXME #12808: strange name to try to avoid interfering with
@@ -180,7 +180,7 @@ impl<T> Arc<T> {
180180
///
181181
/// let weak_five = five.downgrade();
182182
/// ```
183-
#[unstable(feature = "unnamed_feature",
183+
#[unstable(feature = "alloc",
184184
reason = "Weak pointers may not belong in this module.")]
185185
pub fn downgrade(&self) -> Weak<T> {
186186
// See the clone() impl for why this is relaxed
@@ -202,12 +202,12 @@ impl<T> Arc<T> {
202202

203203
/// Get the number of weak references to this value.
204204
#[inline]
205-
#[unstable(feature = "unnamed_feature")]
205+
#[unstable(feature = "alloc")]
206206
pub fn weak_count<T>(this: &Arc<T>) -> uint { this.inner().weak.load(SeqCst) - 1 }
207207

208208
/// Get the number of strong references to this value.
209209
#[inline]
210-
#[unstable(feature = "unnamed_feature")]
210+
#[unstable(feature = "alloc")]
211211
pub fn strong_count<T>(this: &Arc<T>) -> uint { this.inner().strong.load(SeqCst) }
212212

213213
#[stable(feature = "grandfathered", since = "1.0.0")]
@@ -273,7 +273,7 @@ impl<T: Send + Sync + Clone> Arc<T> {
273273
/// let mut_five = five.make_unique();
274274
/// ```
275275
#[inline]
276-
#[unstable(feature = "unnamed_feature")]
276+
#[unstable(feature = "alloc")]
277277
pub fn make_unique(&mut self) -> &mut T {
278278
// Note that we hold a strong reference, which also counts as a weak reference, so we only
279279
// clone if there is an additional reference of either kind.
@@ -357,7 +357,7 @@ impl<T: Sync + Send> Drop for Arc<T> {
357357
}
358358
}
359359

360-
#[unstable(feature = "unnamed_feature",
360+
#[unstable(feature = "alloc",
361361
reason = "Weak pointers may not belong in this module.")]
362362
impl<T: Sync + Send> Weak<T> {
363363
/// Upgrades a weak reference to a strong reference.
@@ -396,7 +396,7 @@ impl<T: Sync + Send> Weak<T> {
396396
}
397397
}
398398

399-
#[unstable(feature = "unnamed_feature",
399+
#[unstable(feature = "alloc",
400400
reason = "Weak pointers may not belong in this module.")]
401401
impl<T: Sync + Send> Clone for Weak<T> {
402402
/// Makes a clone of the `Weak<T>`.

src/liballoc/boxed.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ use core::ops::{Deref, DerefMut};
4444
/// }
4545
/// ```
4646
#[lang = "exchange_heap"]
47-
#[unstable(feature = "unnamed_feature",
47+
#[unstable(feature = "alloc",
4848
reason = "may be renamed; uncertain about custom allocator design")]
4949
pub static HEAP: () = ();
5050

@@ -126,7 +126,7 @@ impl<S: hash::Hasher, T: ?Sized + Hash<S>> Hash<S> for Box<T> {
126126
}
127127

128128
/// Extension methods for an owning `Any` trait object.
129-
#[unstable(feature = "unnamed_feature",
129+
#[unstable(feature = "alloc",
130130
reason = "this trait will likely disappear once compiler bugs blocking \
131131
a direct impl on `Box<Any>` have been fixed ")]
132132
// FIXME(#18737): this should be a direct impl on `Box<Any>`. If you're

src/liballoc/heap.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ pub fn usable_size(size: uint, align: uint) -> uint {
8080
///
8181
/// These statistics may be inconsistent if other threads use the allocator
8282
/// during the call.
83-
#[unstable(feature = "unnamed_feature")]
83+
#[unstable(feature = "alloc")]
8484
pub fn stats_print() {
8585
imp::stats_print();
8686
}

src/liballoc/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
//! default global allocator. It is not compatible with the libc allocator API.
5858
5959
#![crate_name = "alloc"]
60-
#![unstable(feature = "unnamed_feature")]
60+
#![unstable(feature = "alloc")]
6161
#![feature(staged_api)]
6262
#![staged_api]
6363
#![crate_type = "rlib"]
@@ -70,8 +70,10 @@
7070
#![feature(lang_items, unsafe_destructor)]
7171
#![feature(box_syntax)]
7272
#![feature(optin_builtin_traits)]
73-
#![feature(unnamed_feature)]
7473
#![allow(unknown_features)] #![feature(int_uint)]
74+
#![feature(core)]
75+
#![feature(hash)]
76+
#![feature(libc)]
7577

7678
#[macro_use]
7779
extern crate core;

src/liballoc/rc.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ impl<T> Rc<T> {
268268
/// let weak_five = five.downgrade();
269269
/// ```
270270
#[cfg(stage0)] // NOTE remove after next snapshot
271-
#[unstable(feature = "unnamed_feature",
271+
#[unstable(feature = "alloc",
272272
reason = "Weak pointers may not belong in this module")]
273273
pub fn downgrade(&self) -> Weak<T> {
274274
self.inc_weak();
@@ -291,7 +291,7 @@ impl<T> Rc<T> {
291291
/// let weak_five = five.downgrade();
292292
/// ```
293293
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
294-
#[unstable(feature = "unnamed_feature",
294+
#[unstable(feature = "alloc",
295295
reason = "Weak pointers may not belong in this module")]
296296
pub fn downgrade(&self) -> Weak<T> {
297297
self.inc_weak();
@@ -301,12 +301,12 @@ impl<T> Rc<T> {
301301

302302
/// Get the number of weak references to this value.
303303
#[inline]
304-
#[unstable(feature = "unnamed_feature")]
304+
#[unstable(feature = "alloc")]
305305
pub fn weak_count<T>(this: &Rc<T>) -> uint { this.weak() - 1 }
306306

307307
/// Get the number of strong references to this value.
308308
#[inline]
309-
#[unstable(feature = "unnamed_feature")]
309+
#[unstable(feature = "alloc")]
310310
pub fn strong_count<T>(this: &Rc<T>) -> uint { this.strong() }
311311

312312
/// 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() }
322322
/// rc::is_unique(&five);
323323
/// ```
324324
#[inline]
325-
#[unstable(feature = "unnamed_feature")]
325+
#[unstable(feature = "alloc")]
326326
pub fn is_unique<T>(rc: &Rc<T>) -> bool {
327327
weak_count(rc) == 0 && strong_count(rc) == 1
328328
}
@@ -344,7 +344,7 @@ pub fn is_unique<T>(rc: &Rc<T>) -> bool {
344344
/// assert_eq!(rc::try_unwrap(x), Err(Rc::new(4u)));
345345
/// ```
346346
#[inline]
347-
#[unstable(feature = "unnamed_feature")]
347+
#[unstable(feature = "alloc")]
348348
pub fn try_unwrap<T>(rc: Rc<T>) -> Result<T, Rc<T>> {
349349
if is_unique(&rc) {
350350
unsafe {
@@ -378,7 +378,7 @@ pub fn try_unwrap<T>(rc: Rc<T>) -> Result<T, Rc<T>> {
378378
/// assert!(rc::get_mut(&mut x).is_none());
379379
/// ```
380380
#[inline]
381-
#[unstable(feature = "unnamed_feature")]
381+
#[unstable(feature = "alloc")]
382382
pub fn get_mut<'a, T>(rc: &'a mut Rc<T>) -> Option<&'a mut T> {
383383
if is_unique(rc) {
384384
let inner = unsafe { &mut **rc._ptr };
@@ -404,7 +404,7 @@ impl<T: Clone> Rc<T> {
404404
/// let mut_five = five.make_unique();
405405
/// ```
406406
#[inline]
407-
#[unstable(feature = "unnamed_feature")]
407+
#[unstable(feature = "alloc")]
408408
pub fn make_unique(&mut self) -> &mut T {
409409
if !is_unique(self) {
410410
*self = Rc::new((**self).clone())
@@ -695,7 +695,7 @@ impl<S: hash::Hasher, T: Hash<S>> Hash<S> for Rc<T> {
695695
}
696696
}
697697

698-
#[unstable(feature = "unnamed_feature", reason = "Show is experimental.")]
698+
#[unstable(feature = "alloc", reason = "Show is experimental.")]
699699
impl<T: fmt::Show> fmt::Show for Rc<T> {
700700
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
701701
write!(f, "Rc({:?})", **self)
@@ -716,7 +716,7 @@ impl<T: fmt::String> fmt::String for Rc<T> {
716716
/// See the [module level documentation](../index.html) for more.
717717
#[unsafe_no_drop_flag]
718718
#[cfg(stage0)] // NOTE remove impl after next snapshot
719-
#[unstable(feature = "unnamed_feature",
719+
#[unstable(feature = "alloc",
720720
reason = "Weak pointers may not belong in this module.")]
721721
pub struct Weak<T> {
722722
// FIXME #12808: strange names to try to avoid interfering with
@@ -732,7 +732,7 @@ pub struct Weak<T> {
732732
///
733733
/// See the [module level documentation](../index.html) for more.
734734
#[unsafe_no_drop_flag]
735-
#[unstable(feature = "unnamed_feature",
735+
#[unstable(feature = "alloc",
736736
reason = "Weak pointers may not belong in this module.")]
737737
#[cfg(not(stage0))] // NOTE remove cfg after next snapshot
738738
pub struct Weak<T> {
@@ -748,7 +748,7 @@ impl<T> !marker::Send for Weak<T> {}
748748
impl<T> !marker::Sync for Weak<T> {}
749749

750750

751-
#[unstable(feature = "unnamed_feature",
751+
#[unstable(feature = "alloc",
752752
reason = "Weak pointers may not belong in this module.")]
753753
impl<T> Weak<T> {
754754
/// Upgrades a weak reference to a strong reference.
@@ -850,7 +850,7 @@ impl<T> Drop for Weak<T> {
850850
}
851851
}
852852

853-
#[unstable(feature = "unnamed_feature",
853+
#[unstable(feature = "alloc",
854854
reason = "Weak pointers may not belong in this module.")]
855855
impl<T> Clone for Weak<T> {
856856
/// Makes a clone of the `Weak<T>`.
@@ -894,7 +894,7 @@ impl<T> Clone for Weak<T> {
894894
}
895895
}
896896

897-
#[unstable(feature = "unnamed_feature", reason = "Show is experimental.")]
897+
#[unstable(feature = "alloc", reason = "Show is experimental.")]
898898
impl<T: fmt::Show> fmt::Show for Weak<T> {
899899
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
900900
write!(f, "(Weak)")

src/libarena/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
//! more complex, slower arena which can hold objects of any type.
2121
2222
#![crate_name = "arena"]
23-
#![unstable(feature = "unnamed_feature")]
23+
#![unstable(feature = "rustc_private")]
2424
#![feature(staged_api)]
2525
#![staged_api]
2626
#![crate_type = "rlib"]
@@ -33,9 +33,10 @@
3333
#![feature(unsafe_destructor)]
3434
#![feature(unboxed_closures)]
3535
#![feature(box_syntax)]
36-
#![feature(unnamed_feature)]
3736
#![allow(unknown_features)] #![feature(int_uint)]
3837
#![allow(missing_docs)]
38+
#![feature(alloc)]
39+
#![feature(core)]
3940

4041
extern crate alloc;
4142

src/libcollections/binary_heap.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ impl<T: Ord> BinaryHeap<T> {
551551

552552
/// Clears the binary heap, returning an iterator over the removed elements.
553553
#[inline]
554-
#[unstable(feature = "unnamed_feature",
554+
#[unstable(feature = "collections",
555555
reason = "matches collection reform specification, waiting for dust to settle")]
556556
pub fn drain(&mut self) -> Drain<T> {
557557
Drain { iter: self.data.drain() }
@@ -623,7 +623,7 @@ impl<T> DoubleEndedIterator for IntoIter<T> {
623623
impl<T> ExactSizeIterator for IntoIter<T> {}
624624

625625
/// An iterator that drains a `BinaryHeap`.
626-
#[unstable(feature = "unnamed_feature", reason = "recent addition")]
626+
#[unstable(feature = "collections", reason = "recent addition")]
627627
pub struct Drain<'a, T: 'a> {
628628
iter: vec::Drain<'a, T>,
629629
}

src/libcollections/bit.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ static FALSE: bool = false;
156156
/// println!("{:?}", bv);
157157
/// println!("total bits set to true: {}", bv.iter().filter(|x| *x).count());
158158
/// ```
159-
#[unstable(feature = "unnamed_feature",
159+
#[unstable(feature = "collections",
160160
reason = "RFC 509")]
161161
pub struct Bitv {
162162
/// Internal representation of the bit vector
@@ -403,7 +403,7 @@ impl Bitv {
403403
/// assert_eq!(bv[3], true);
404404
/// ```
405405
#[inline]
406-
#[unstable(feature = "unnamed_feature",
406+
#[unstable(feature = "collections",
407407
reason = "panic semantics are likely to change in the future")]
408408
pub fn set(&mut self, i: uint, x: bool) {
409409
assert!(i < self.nbits);
@@ -1109,7 +1109,7 @@ impl<'a> RandomAccessIterator for Iter<'a> {
11091109
/// assert!(bv[3]);
11101110
/// ```
11111111
#[derive(Clone)]
1112-
#[unstable(feature = "unnamed_feature",
1112+
#[unstable(feature = "collections",
11131113
reason = "RFC 509")]
11141114
pub struct BitvSet {
11151115
bitv: Bitv,

0 commit comments

Comments
 (0)