diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2015-01-08 09:22:03 -0800 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2015-01-08 09:22:03 -0800 |
| commit | e40f62d9bf55279cdbaf9a20a017418f579979c2 (patch) | |
| tree | fe1a02bfc86982bd68e9a74fcb00df2deec5b7cd /src/libcollections | |
| parent | 6a48b181bd0f1c01ad3d29f75a5c858d023990b4 (diff) | |
| parent | 1f70acbf4c4f345265a7626bd927187d3bfed91f (diff) | |
| download | rust-e40f62d9bf55279cdbaf9a20a017418f579979c2.tar.gz rust-e40f62d9bf55279cdbaf9a20a017418f579979c2.zip | |
rollup merge of #20738: brson/feature-staging2
This gets rid of the 'experimental' level, removes the non-staged_api case (i.e. stability levels for out-of-tree crates), and lets the staged_api attributes use 'unstable' and 'deprecated' lints. This makes the transition period to the full feature staging design a bit nicer.
Diffstat (limited to 'src/libcollections')
| -rw-r--r-- | src/libcollections/lib.rs | 2 | ||||
| -rw-r--r-- | src/libcollections/slice.rs | 34 | ||||
| -rw-r--r-- | src/libcollections/string.rs | 18 | ||||
| -rw-r--r-- | src/libcollections/vec.rs | 20 |
4 files changed, 37 insertions, 37 deletions
diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index 7692c1558a7..8d57cfb6a5d 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -14,7 +14,7 @@ #![crate_name = "collections"] -#![experimental] +#![unstable] #![staged_api] #![crate_type = "rlib"] #![doc(html_logo_url = "http://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs index cb3fbd461cd..9a1f22ef7a6 100644 --- a/src/libcollections/slice.rs +++ b/src/libcollections/slice.rs @@ -166,7 +166,7 @@ pub trait SliceExt { /// assert_eq!(num_moved, 3); /// assert!(a == [6i, 7, 8, 4, 5]); /// ``` - #[experimental = "uncertain about this API approach"] + #[unstable = "uncertain about this API approach"] fn move_from(&mut self, src: Vec<Self::Item>, start: uint, end: uint) -> uint; /// Returns a subslice spanning the interval [`start`, `end`). @@ -175,7 +175,7 @@ pub trait SliceExt { /// original slice (i.e. when `end > self.len()`) or when `start > end`. /// /// Slicing with `start` equal to `end` yields an empty slice. - #[experimental = "will be replaced by slice syntax"] + #[unstable = "will be replaced by slice syntax"] fn slice(&self, start: uint, end: uint) -> &[Self::Item]; /// Returns a subslice from `start` to the end of the slice. @@ -183,7 +183,7 @@ pub trait SliceExt { /// Panics when `start` is strictly greater than the length of the original slice. /// /// Slicing from `self.len()` yields an empty slice. - #[experimental = "will be replaced by slice syntax"] + #[unstable = "will be replaced by slice syntax"] fn slice_from(&self, start: uint) -> &[Self::Item]; /// Returns a subslice from the start of the slice to `end`. @@ -191,7 +191,7 @@ pub trait SliceExt { /// Panics when `end` is strictly greater than the length of the original slice. /// /// Slicing to `0` yields an empty slice. - #[experimental = "will be replaced by slice syntax"] + #[unstable = "will be replaced by slice syntax"] fn slice_to(&self, end: uint) -> &[Self::Item]; /// Divides one slice into two at an index. @@ -284,11 +284,11 @@ pub trait SliceExt { fn first(&self) -> Option<&Self::Item>; /// Returns all but the first element of a slice. - #[experimental = "likely to be renamed"] + #[unstable = "likely to be renamed"] fn tail(&self) -> &[Self::Item]; /// Returns all but the last element of a slice. - #[experimental = "likely to be renamed"] + #[unstable = "likely to be renamed"] fn init(&self) -> &[Self::Item]; /// Returns the last element of a slice, or `None` if it is empty. @@ -384,7 +384,7 @@ pub trait SliceExt { /// original slice (i.e. when `end > self.len()`) or when `start > end`. /// /// Slicing with `start` equal to `end` yields an empty slice. - #[experimental = "will be replaced by slice syntax"] + #[unstable = "will be replaced by slice syntax"] fn slice_mut(&mut self, start: uint, end: uint) -> &mut [Self::Item]; /// Returns a mutable subslice from `start` to the end of the slice. @@ -392,7 +392,7 @@ pub trait SliceExt { /// Panics when `start` is strictly greater than the length of the original slice. /// /// Slicing from `self.len()` yields an empty slice. - #[experimental = "will be replaced by slice syntax"] + #[unstable = "will be replaced by slice syntax"] fn slice_from_mut(&mut self, start: uint) -> &mut [Self::Item]; /// Returns a mutable subslice from the start of the slice to `end`. @@ -400,7 +400,7 @@ pub trait SliceExt { /// Panics when `end` is strictly greater than the length of the original slice. /// /// Slicing to `0` yields an empty slice. - #[experimental = "will be replaced by slice syntax"] + #[unstable = "will be replaced by slice syntax"] fn slice_to_mut(&mut self, end: uint) -> &mut [Self::Item]; /// Returns an iterator that allows modifying each value @@ -412,11 +412,11 @@ pub trait SliceExt { fn first_mut(&mut self) -> Option<&mut Self::Item>; /// Returns all but the first element of a mutable slice - #[experimental = "likely to be renamed or removed"] + #[unstable = "likely to be renamed or removed"] fn tail_mut(&mut self) -> &mut [Self::Item]; /// Returns all but the last element of a mutable slice - #[experimental = "likely to be renamed or removed"] + #[unstable = "likely to be renamed or removed"] fn init_mut(&mut self) -> &mut [Self::Item]; /// Returns a mutable pointer to the last item in the slice. @@ -588,7 +588,7 @@ pub trait SliceExt { /// assert!(dst.clone_from_slice(&src2) == 3); /// assert!(dst == [3i, 4, 5]); /// ``` - #[experimental] + #[unstable] fn clone_from_slice(&mut self, &[Self::Item]) -> uint where Self::Item: Clone; /// Sorts the slice, in place. @@ -677,11 +677,11 @@ pub trait SliceExt { fn prev_permutation(&mut self) -> bool where Self::Item: Ord; /// Find the first index containing a matching value. - #[experimental] + #[unstable] fn position_elem(&self, t: &Self::Item) -> Option<uint> where Self::Item: PartialEq; /// Find the last index containing a matching value. - #[experimental] + #[unstable] fn rposition_elem(&self, t: &Self::Item) -> Option<uint> where Self::Item: PartialEq; /// Return true if the slice contains an element with the given value. @@ -697,7 +697,7 @@ pub trait SliceExt { fn ends_with(&self, needle: &[Self::Item]) -> bool where Self::Item: PartialEq; /// Convert `self` into a vector without clones or allocation. - #[experimental] + #[unstable] fn into_vec(self: Box<Self>) -> Vec<Self::Item>; } @@ -1034,7 +1034,7 @@ impl<T: Clone, V: AsSlice<T>> SliceConcatExt<T, Vec<T>> for [V] { /// /// The last generated swap is always (0, 1), and it returns the /// sequence to its initial order. -#[experimental] +#[unstable] #[derive(Clone)] pub struct ElementSwaps { sdir: Vec<SizeDirection>, @@ -1046,7 +1046,7 @@ pub struct ElementSwaps { impl ElementSwaps { /// Creates an `ElementSwaps` iterator for a sequence of `length` elements. - #[experimental] + #[unstable] pub fn new(length: uint) -> ElementSwaps { // Initialize `sdir` with a direction that position should move in // (all negative at the beginning) and the `size` of the diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index 317f03e1b7d..5991fc832e9 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -92,7 +92,7 @@ impl String { /// assert_eq!(s.as_slice(), "hello"); /// ``` #[inline] - #[experimental = "needs investigation to see if to_string() can match perf"] + #[unstable = "needs investigation to see if to_string() can match perf"] pub fn from_str(string: &str) -> String { String { vec: ::slice::SliceExt::to_vec(string.as_bytes()) } } @@ -719,7 +719,7 @@ impl<'a> FromIterator<&'a str> for String { } } -#[experimental = "waiting on Extend stabilization"] +#[unstable = "waiting on Extend stabilization"] impl Extend<char> for String { fn extend<I:Iterator<Item=char>>(&mut self, mut iterator: I) { let (lower_bound, _) = iterator.size_hint(); @@ -730,7 +730,7 @@ impl Extend<char> for String { } } -#[experimental = "waiting on Extend stabilization"] +#[unstable = "waiting on Extend stabilization"] impl<'a> Extend<&'a str> for String { fn extend<I: Iterator<Item=&'a str>>(&mut self, mut iterator: I) { // A guess that at least one byte per iterator element will be needed. @@ -790,7 +790,7 @@ impl<'a, 'b> PartialEq<CowString<'a>> for &'b str { fn ne(&self, other: &CowString<'a>) -> bool { PartialEq::ne(&**self, &**other) } } -#[experimental = "waiting on Str stabilization"] +#[unstable = "waiting on Str stabilization"] impl Str for String { #[inline] #[stable] @@ -814,14 +814,14 @@ impl fmt::String for String { } } -#[experimental = "waiting on fmt stabilization"] +#[unstable = "waiting on fmt stabilization"] impl fmt::Show for String { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Show::fmt(&**self, f) } } -#[experimental = "waiting on Hash stabilization"] +#[unstable = "waiting on Hash stabilization"] #[cfg(stage0)] impl<H: hash::Writer> hash::Hash<H> for String { #[inline] @@ -829,7 +829,7 @@ impl<H: hash::Writer> hash::Hash<H> for String { (**self).hash(hasher) } } -#[experimental = "waiting on Hash stabilization"] +#[unstable = "waiting on Hash stabilization"] #[cfg(not(stage0))] impl<H: hash::Writer + hash::Hasher> hash::Hash<H> for String { #[inline] @@ -887,7 +887,7 @@ impl ops::Deref for String { } /// Wrapper type providing a `&String` reference via `Deref`. -#[experimental] +#[unstable] pub struct DerefString<'a> { x: DerefVec<'a, u8> } @@ -914,7 +914,7 @@ impl<'a> Deref for DerefString<'a> { /// let string = as_string("foo").clone(); /// string_consumer(string); /// ``` -#[experimental] +#[unstable] pub fn as_string<'a>(x: &'a str) -> DerefString<'a> { DerefString { x: as_vec(x.as_bytes()) } } diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 69a3947df2b..47afc78bc12 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -376,7 +376,7 @@ impl<T> Vec<T> { /// Note that this will drop any excess capacity. Calling this and /// converting back to a vector with `into_vec()` is equivalent to calling /// `shrink_to_fit()`. - #[experimental] + #[unstable] pub fn into_boxed_slice(mut self) -> Box<[T]> { self.shrink_to_fit(); unsafe { @@ -777,7 +777,7 @@ impl<T> Vec<T> { /// let newtyped_bytes = bytes.map_in_place(|x| Newtype(x)); /// assert_eq!(newtyped_bytes.as_slice(), [Newtype(0x11), Newtype(0x22)].as_slice()); /// ``` - #[experimental = "API may change to provide stronger guarantees"] + #[unstable = "API may change to provide stronger guarantees"] pub fn map_in_place<U, F>(self, mut f: F) -> Vec<U> where F: FnMut(T) -> U { // FIXME: Assert statically that the types `T` and `U` have the same // size. @@ -995,7 +995,7 @@ impl<T: Clone> Vec<T> { /// assert_eq!(vec, vec![1, 2, 3, 4]); /// ``` #[inline] - #[experimental = "likely to be replaced by a more optimized extend"] + #[unstable = "likely to be replaced by a more optimized extend"] pub fn push_all(&mut self, other: &[T]) { self.reserve(other.len()); @@ -1200,7 +1200,7 @@ impl<S: hash::Writer + hash::Hasher, T: Hash<S>> Hash<S> for Vec<T> { } } -#[experimental = "waiting on Index stability"] +#[unstable = "waiting on Index stability"] impl<T> Index<uint> for Vec<T> { type Output = T; @@ -1304,7 +1304,7 @@ impl<T> FromIterator<T> for Vec<T> { } } -#[experimental = "waiting on Extend stability"] +#[unstable = "waiting on Extend stability"] impl<T> Extend<T> for Vec<T> { #[inline] fn extend<I: Iterator<Item=T>>(&mut self, mut iterator: I) { @@ -1457,7 +1457,7 @@ impl<T> Default for Vec<T> { } } -#[experimental = "waiting on Show stability"] +#[unstable = "waiting on Show stability"] impl<T: fmt::Show> fmt::Show for Vec<T> { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fmt::Show::fmt(self.as_slice(), f) @@ -1475,7 +1475,7 @@ impl<'a> fmt::Writer for Vec<u8> { // Clone-on-write //////////////////////////////////////////////////////////////////////////////// -#[experimental = "unclear how valuable this alias is"] +#[unstable = "unclear how valuable this alias is"] /// A clone-on-write vector pub type CowVec<'a, T> = Cow<'a, Vec<T>, [T]>; @@ -1693,13 +1693,13 @@ impl<'a, T> Drop for Drain<'a, T> { //////////////////////////////////////////////////////////////////////////////// /// Wrapper type providing a `&Vec<T>` reference via `Deref`. -#[experimental] +#[unstable] pub struct DerefVec<'a, T> { x: Vec<T>, l: ContravariantLifetime<'a> } -#[experimental] +#[unstable] impl<'a, T> Deref for DerefVec<'a, T> { type Target = Vec<T>; @@ -1719,7 +1719,7 @@ impl<'a, T> Drop for DerefVec<'a, T> { } /// Convert a slice to a wrapper type providing a `&Vec<T>` reference. -#[experimental] +#[unstable] pub fn as_vec<'a, T>(x: &'a [T]) -> DerefVec<'a, T> { unsafe { DerefVec { |
