From 377c11aa83c1d2f6cc07fe178eb18a31e1813304 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Wed, 12 Aug 2015 22:19:51 -0700 Subject: [PATCH] collections: Add issues for unstable features --- src/libcollections/binary_heap.rs | 5 ++-- src/libcollections/borrow.rs | 3 +- src/libcollections/btree/map.rs | 9 ++++-- src/libcollections/btree/set.rs | 6 ++-- src/libcollections/enum_set.rs | 3 +- src/libcollections/lib.rs | 5 ++-- src/libcollections/linked_list.rs | 6 ++-- src/libcollections/range.rs | 3 +- src/libcollections/slice.rs | 16 ++++++----- src/libcollections/str.rs | 47 ++++++++++++++++++++----------- src/libcollections/string.rs | 26 ++++++++++------- src/libcollections/vec.rs | 23 +++++++++------ src/libcollections/vec_deque.rs | 33 ++++++++++++++-------- 13 files changed, 120 insertions(+), 65 deletions(-) diff --git a/src/libcollections/binary_heap.rs b/src/libcollections/binary_heap.rs index c46025b33351c..b817ed6a6d0eb 100644 --- a/src/libcollections/binary_heap.rs +++ b/src/libcollections/binary_heap.rs @@ -547,7 +547,8 @@ impl BinaryHeap { #[inline] #[unstable(feature = "drain", reason = "matches collection reform specification, \ - waiting for dust to settle")] + waiting for dust to settle", + issue = "27711")] pub fn drain(&mut self) -> Drain { Drain { iter: self.data.drain(..) } } @@ -685,7 +686,7 @@ impl DoubleEndedIterator for IntoIter { impl ExactSizeIterator for IntoIter {} /// An iterator that drains a `BinaryHeap`. -#[unstable(feature = "drain", reason = "recent addition")] +#[unstable(feature = "drain", reason = "recent addition", issue = "27711")] pub struct Drain<'a, T: 'a> { iter: vec::Drain<'a, T>, } diff --git a/src/libcollections/borrow.rs b/src/libcollections/borrow.rs index a7b4c17314bcb..bfd069152509d 100644 --- a/src/libcollections/borrow.rs +++ b/src/libcollections/borrow.rs @@ -344,7 +344,8 @@ impl<'a, B: ?Sized> Hash for Cow<'a, B> where B: Hash + ToOwned } /// Trait for moving into a `Cow`. -#[unstable(feature = "into_cow", reason = "may be replaced by `convert::Into`")] +#[unstable(feature = "into_cow", reason = "may be replaced by `convert::Into`", + issue = "27735")] pub trait IntoCow<'a, B: ?Sized> where B: ToOwned { /// Moves `self` into `Cow` fn into_cow(self) -> Cow<'a, B>; diff --git a/src/libcollections/btree/map.rs b/src/libcollections/btree/map.rs index e5d6909caa521..2835e28a9462c 100644 --- a/src/libcollections/btree/map.rs +++ b/src/libcollections/btree/map.rs @@ -157,6 +157,9 @@ impl BTreeMap { /// Makes a new empty BTreeMap with the given B. /// /// B cannot be less than 2. + #[unstable(feature = "btree_b", + reason = "probably want this to be on the type, eventually", + issue = "27795")] pub fn with_b(b: usize) -> BTreeMap { assert!(b > 1, "B must be greater than 1"); BTreeMap { @@ -1504,7 +1507,8 @@ impl BTreeMap { /// assert_eq!(Some((&5, &"b")), map.range(Included(&4), Unbounded).next()); /// ``` #[unstable(feature = "btree_range", - reason = "matches collection reform specification, waiting for dust to settle")] + reason = "matches collection reform specification, waiting for dust to settle", + issue = "27787")] pub fn range(&self, min: Bound<&Min>, max: Bound<&Max>) -> Range where @@ -1537,7 +1541,8 @@ impl BTreeMap { /// } /// ``` #[unstable(feature = "btree_range", - reason = "matches collection reform specification, waiting for dust to settle")] + reason = "matches collection reform specification, waiting for dust to settle", + issue = "27787")] pub fn range_mut(&mut self, min: Bound<&Min>, max: Bound<&Max>) -> RangeMut where diff --git a/src/libcollections/btree/set.rs b/src/libcollections/btree/set.rs index 3f545e7b2a16d..a942d6aa6696a 100644 --- a/src/libcollections/btree/set.rs +++ b/src/libcollections/btree/set.rs @@ -101,7 +101,8 @@ impl BTreeSet { /// /// B cannot be less than 2. #[unstable(feature = "btree_b", - reason = "probably want this to be on the type, eventually")] + reason = "probably want this to be on the type, eventually", + issue = "27795")] pub fn with_b(b: usize) -> BTreeSet { BTreeSet { map: BTreeMap::with_b(b) } } @@ -154,7 +155,8 @@ impl BTreeSet { /// assert_eq!(Some(&5), set.range(Included(&4), Unbounded).next()); /// ``` #[unstable(feature = "btree_range", - reason = "matches collection reform specification, waiting for dust to settle")] + reason = "matches collection reform specification, waiting for dust to settle", + issue = "27787")] pub fn range<'a, Min: ?Sized + Ord = T, Max: ?Sized + Ord = T>(&'a self, min: Bound<&Min>, max: Bound<&Max>) -> Range<'a, T> where diff --git a/src/libcollections/enum_set.rs b/src/libcollections/enum_set.rs index 246c213a19b2d..7e7e8ba2356e3 100644 --- a/src/libcollections/enum_set.rs +++ b/src/libcollections/enum_set.rs @@ -15,7 +15,8 @@ #![unstable(feature = "enumset", reason = "matches collection reform specification, \ - waiting for dust to settle")] + waiting for dust to settle", + issue = "0")] use core::marker; use core::fmt; diff --git a/src/libcollections/lib.rs b/src/libcollections/lib.rs index cbafd6fc6edad..702b01f0e2eee 100644 --- a/src/libcollections/lib.rs +++ b/src/libcollections/lib.rs @@ -20,7 +20,8 @@ #![crate_type = "rlib"] #![unstable(feature = "collections", reason = "library is unlikely to be stabilized with the current \ - layout and name, use std::collections instead")] + layout and name, use std::collections instead", + issue = "27783")] #![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png", html_favicon_url = "https://doc.rust-lang.org/favicon.ico", html_root_url = "https://doc.rust-lang.org/nightly/", @@ -110,7 +111,7 @@ mod std { } /// An endpoint of a range of keys. -#[unstable(feature = "collections_bound")] +#[unstable(feature = "collections_bound", issue = "27711")] #[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)] pub enum Bound { /// An inclusive bound. diff --git a/src/libcollections/linked_list.rs b/src/libcollections/linked_list.rs index 50b5db758c1ed..80ef2067819cf 100644 --- a/src/libcollections/linked_list.rs +++ b/src/libcollections/linked_list.rs @@ -801,7 +801,8 @@ impl<'a, A> IterMut<'a, A> { /// ``` #[inline] #[unstable(feature = "linked_list_extras", - reason = "this is probably better handled by a cursor type -- we'll see")] + reason = "this is probably better handled by a cursor type -- we'll see", + issue = "27794")] pub fn insert_next(&mut self, elt: A) { self.insert_next_node(box Node::new(elt)) } @@ -825,7 +826,8 @@ impl<'a, A> IterMut<'a, A> { /// ``` #[inline] #[unstable(feature = "linked_list_extras", - reason = "this is probably better handled by a cursor type -- we'll see")] + reason = "this is probably better handled by a cursor type -- we'll see", + issue = "27794")] pub fn peek_next(&mut self) -> Option<&mut A> { if self.nelem == 0 { return None diff --git a/src/libcollections/range.rs b/src/libcollections/range.rs index f37c4aede6a1a..e7414bcf323f6 100644 --- a/src/libcollections/range.rs +++ b/src/libcollections/range.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![unstable(feature = "collections_range", reason = "was just added")] +#![unstable(feature = "collections_range", reason = "was just added", + issue = "27711")] //! Range syntax. diff --git a/src/libcollections/slice.rs b/src/libcollections/slice.rs index a15573f04f326..76bdd6dbea122 100644 --- a/src/libcollections/slice.rs +++ b/src/libcollections/slice.rs @@ -214,21 +214,21 @@ impl [T] { } /// Returns the first and all the rest of the elements of a slice. - #[unstable(feature = "slice_splits", reason = "new API")] + #[unstable(feature = "slice_splits", reason = "new API", issue = "27742")] #[inline] pub fn split_first(&self) -> Option<(&T, &[T])> { core_slice::SliceExt::split_first(self) } /// Returns the first and all the rest of the elements of a slice. - #[unstable(feature = "slice_splits", reason = "new API")] + #[unstable(feature = "slice_splits", reason = "new API", issue = "27742")] #[inline] pub fn split_first_mut(&mut self) -> Option<(&mut T, &mut [T])> { core_slice::SliceExt::split_first_mut(self) } /// Returns the last and all the rest of the elements of a slice. - #[unstable(feature = "slice_splits", reason = "new API")] + #[unstable(feature = "slice_splits", reason = "new API", issue = "27742")] #[inline] pub fn split_last(&self) -> Option<(&T, &[T])> { core_slice::SliceExt::split_last(self) @@ -236,7 +236,7 @@ impl [T] { } /// Returns the last and all the rest of the elements of a slice. - #[unstable(feature = "slice_splits", since = "1.3.0")] + #[unstable(feature = "slice_splits", reason = "new API", issue = "27742")] #[inline] pub fn split_last_mut(&mut self) -> Option<(&mut T, &mut [T])> { core_slice::SliceExt::split_last_mut(self) @@ -785,7 +785,7 @@ impl [T] { /// assert!(dst.clone_from_slice(&src2) == 3); /// assert!(dst == [3, 4, 5]); /// ``` - #[unstable(feature = "clone_from_slice")] + #[unstable(feature = "clone_from_slice", issue = "27750")] pub fn clone_from_slice(&mut self, src: &[T]) -> usize where T: Clone { core_slice::SliceExt::clone_from_slice(self, src) } @@ -811,11 +811,13 @@ impl [T] { // Extension traits for slices over specific kinds of data //////////////////////////////////////////////////////////////////////////////// #[unstable(feature = "slice_concat_ext", - reason = "trait should not have to exist")] + reason = "trait should not have to exist", + issue = "27747")] /// An extension trait for concatenating slices pub trait SliceConcatExt { #[unstable(feature = "slice_concat_ext", - reason = "trait should not have to exist")] + reason = "trait should not have to exist", + issue = "27747")] /// The resulting type after concatenation type Output; diff --git a/src/libcollections/str.rs b/src/libcollections/str.rs index 56a04f0398a34..657a3f60448e4 100644 --- a/src/libcollections/str.rs +++ b/src/libcollections/str.rs @@ -105,7 +105,7 @@ impl> SliceConcatExt for [S] { /// /// For use with the `std::iter` module. #[derive(Clone)] -#[unstable(feature = "str_utf16")] +#[unstable(feature = "str_utf16", issue = "27714")] pub struct Utf16Units<'a> { encoder: Utf16Encoder> } @@ -211,7 +211,8 @@ impl str { reason = "it is unclear whether this method pulls its weight \ with the existence of the char_indices iterator or \ this method may want to be replaced with checked \ - slicing")] + slicing", + issue = "27754")] #[inline] pub fn is_char_boundary(&self, index: usize) -> bool { core_str::StrExt::is_char_boundary(self, index) @@ -275,7 +276,8 @@ impl str { /// Takes a bytewise mutable slice from a string. /// /// Same as `slice_unchecked`, but works with `&mut str` instead of `&str`. - #[unstable(feature = "str_slice_mut", reason = "recently added")] + #[unstable(feature = "str_slice_mut", reason = "recently added", + issue = "27793")] #[inline] pub unsafe fn slice_mut_unchecked(&mut self, begin: usize, end: usize) -> &mut str { core_str::StrExt::slice_mut_unchecked(self, begin, end) @@ -329,7 +331,8 @@ impl str { #[unstable(feature = "str_char", reason = "often replaced by char_indices, this method may \ be removed in favor of just char_at() or eventually \ - removed altogether")] + removed altogether", + issue = "27754")] #[inline] pub fn char_range_at(&self, start: usize) -> CharRange { core_str::StrExt::char_range_at(self, start) @@ -388,7 +391,8 @@ impl str { #[unstable(feature = "str_char", reason = "often replaced by char_indices, this method may \ be removed in favor of just char_at_reverse() or \ - eventually removed altogether")] + eventually removed altogether", + issue = "27754")] #[inline] pub fn char_range_at_reverse(&self, start: usize) -> CharRange { core_str::StrExt::char_range_at_reverse(self, start) @@ -416,7 +420,8 @@ impl str { method may be removed or possibly renamed in the \ future; it is normally replaced by chars/char_indices \ iterators or by getting the first char from a \ - subslice")] + subslice", + issue = "27754")] #[inline] pub fn char_at(&self, i: usize) -> char { core_str::StrExt::char_at(self, i) @@ -443,7 +448,8 @@ impl str { #[unstable(feature = "str_char", reason = "see char_at for more details, but reverse semantics \ are also somewhat unclear, especially with which \ - cases generate panics")] + cases generate panics", + issue = "27754")] #[inline] pub fn char_at_reverse(&self, i: usize) -> char { core_str::StrExt::char_at_reverse(self, i) @@ -478,7 +484,8 @@ impl str { #[unstable(feature = "str_char", reason = "awaiting conventions about shifting and slices and \ may not be warranted with the existence of the chars \ - and/or char_indices iterators")] + and/or char_indices iterators", + issue = "27754")] #[inline] pub fn slice_shift_char(&self) -> Option<(char, &str)> { core_str::StrExt::slice_shift_char(self) @@ -508,14 +515,16 @@ impl str { /// assert_eq!(b, " 老虎 Léopard"); /// ``` #[inline] - #[unstable(feature = "str_split_at", reason = "recently added")] + #[unstable(feature = "str_split_at", reason = "recently added", + issue = "27792")] pub fn split_at(&self, mid: usize) -> (&str, &str) { core_str::StrExt::split_at(self, mid) } /// Divide one mutable string slice into two at an index. #[inline] - #[unstable(feature = "str_split_at", reason = "recently added")] + #[unstable(feature = "str_split_at", reason = "recently added", + issue = "27792")] pub fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str) { core_str::StrExt::split_at_mut(self, mid) } @@ -652,7 +661,8 @@ impl str { /// Returns an iterator of `u16` over the string encoded as UTF-16. #[unstable(feature = "str_utf16", - reason = "this functionality may only be provided by libunicode")] + reason = "this functionality may only be provided by libunicode", + issue = "27714")] pub fn utf16_units(&self) -> Utf16Units { Utf16Units { encoder: Utf16Encoder::new(self[..].chars()) } } @@ -1186,7 +1196,8 @@ impl str { /// assert_eq!(v, [(0, 3)]); // only the first `aba` /// ``` #[unstable(feature = "str_match_indices", - reason = "might have its iterator type changed")] + reason = "might have its iterator type changed", + issue = "27743")] // NB: Right now MatchIndices yields `(usize, usize)`, but it would // be more consistent with `matches` and `char_indices` to return `(usize, &str)` pub fn match_indices<'a, P: Pattern<'a>>(&'a self, pat: P) -> MatchIndices<'a, P> { @@ -1231,7 +1242,8 @@ impl str { /// assert_eq!(v, [(2, 5)]); // only the last `aba` /// ``` #[unstable(feature = "str_match_indices", - reason = "might have its iterator type changed")] + reason = "might have its iterator type changed", + issue = "27743")] // NB: Right now RMatchIndices yields `(usize, usize)`, but it would // be more consistent with `rmatches` and `char_indices` to return `(usize, &str)` pub fn rmatch_indices<'a, P: Pattern<'a>>(&'a self, pat: P) -> RMatchIndices<'a, P> @@ -1476,21 +1488,24 @@ impl str { /// Escapes each char in `s` with `char::escape_default`. #[unstable(feature = "str_escape", - reason = "return type may change to be an iterator")] + reason = "return type may change to be an iterator", + issue = "27791")] pub fn escape_default(&self) -> String { self.chars().flat_map(|c| c.escape_default()).collect() } /// Escapes each char in `s` with `char::escape_unicode`. #[unstable(feature = "str_escape", - reason = "return type may change to be an iterator")] + reason = "return type may change to be an iterator", + issue = "27791")] pub fn escape_unicode(&self) -> String { self.chars().flat_map(|c| c.escape_unicode()).collect() } /// Converts the `Box` into a `String` without copying or allocating. #[unstable(feature = "box_str", - reason = "recently added, matches RFC")] + reason = "recently added, matches RFC", + issue = "27785")] pub fn into_string(self: Box) -> String { unsafe { let slice = mem::transmute::, Box<[u8]>>(self); diff --git a/src/libcollections/string.rs b/src/libcollections/string.rs index f468fc25ca964..5c5f6cace6a4b 100644 --- a/src/libcollections/string.rs +++ b/src/libcollections/string.rs @@ -343,7 +343,8 @@ impl String { /// Extracts a string slice containing the entire string. #[inline] #[unstable(feature = "convert", - reason = "waiting on RFC revision")] + reason = "waiting on RFC revision", + issue = "27729")] pub fn as_str(&self) -> &str { self } @@ -698,7 +699,8 @@ impl String { /// assert_eq!(s, ""); /// ``` #[unstable(feature = "drain", - reason = "recently added, matches RFC")] + reason = "recently added, matches RFC", + issue = "27711")] pub fn drain(&mut self, range: R) -> Drain where R: RangeArgument { // Memory safety // @@ -728,7 +730,8 @@ impl String { /// /// Note that this will drop any excess capacity. #[unstable(feature = "box_str", - reason = "recently added, matches RFC")] + reason = "recently added, matches RFC", + issue = "27785")] pub fn into_boxed_str(self) -> Box { let slice = self.vec.into_boxed_slice(); unsafe { mem::transmute::, Box>(slice) } @@ -1019,7 +1022,8 @@ impl ops::DerefMut for String { /// Error returned from `String::from` #[unstable(feature = "str_parse_error", reason = "may want to be replaced with \ - Void if it ever exists")] + Void if it ever exists", + issue = "27734")] #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub struct ParseError(()); @@ -1110,7 +1114,8 @@ impl Into> for String { } } -#[unstable(feature = "into_cow", reason = "may be replaced by `convert::Into`")] +#[unstable(feature = "into_cow", reason = "may be replaced by `convert::Into`", + issue= "27735")] impl IntoCow<'static, str> for String { #[inline] fn into_cow(self) -> Cow<'static, str> { @@ -1118,7 +1123,8 @@ impl IntoCow<'static, str> for String { } } -#[unstable(feature = "into_cow", reason = "may be replaced by `convert::Into`")] +#[unstable(feature = "into_cow", reason = "may be replaced by `convert::Into`", + issue = "27735")] impl<'a> IntoCow<'a, str> for &'a str { #[inline] fn into_cow(self) -> Cow<'a, str> { @@ -1142,7 +1148,7 @@ impl fmt::Write for String { } /// A draining iterator for `String`. -#[unstable(feature = "drain", reason = "recently added")] +#[unstable(feature = "drain", reason = "recently added", issue = "27711")] pub struct Drain<'a> { /// Will be used as &'a mut String in the destructor string: *mut String, @@ -1157,7 +1163,7 @@ pub struct Drain<'a> { unsafe impl<'a> Sync for Drain<'a> {} unsafe impl<'a> Send for Drain<'a> {} -#[unstable(feature = "drain", reason = "recently added")] +#[unstable(feature = "drain", reason = "recently added", issue = "27711")] impl<'a> Drop for Drain<'a> { fn drop(&mut self) { unsafe { @@ -1171,7 +1177,7 @@ impl<'a> Drop for Drain<'a> { } } -#[unstable(feature = "drain", reason = "recently added")] +#[unstable(feature = "drain", reason = "recently added", issue = "27711")] impl<'a> Iterator for Drain<'a> { type Item = char; @@ -1185,7 +1191,7 @@ impl<'a> Iterator for Drain<'a> { } } -#[unstable(feature = "drain", reason = "recently added")] +#[unstable(feature = "drain", reason = "recently added", issue = "27711")] impl<'a> DoubleEndedIterator for Drain<'a> { #[inline] fn next_back(&mut self) -> Option { diff --git a/src/libcollections/vec.rs b/src/libcollections/vec.rs index 957c1a767a4cf..ec3c36d0c8137 100644 --- a/src/libcollections/vec.rs +++ b/src/libcollections/vec.rs @@ -384,7 +384,8 @@ impl Vec { /// Equivalent to `&s[..]`. #[inline] #[unstable(feature = "convert", - reason = "waiting on RFC revision")] + reason = "waiting on RFC revision", + issue = "27729")] pub fn as_slice(&self) -> &[T] { self } @@ -394,7 +395,8 @@ impl Vec { /// Equivalent to `&mut s[..]`. #[inline] #[unstable(feature = "convert", - reason = "waiting on RFC revision")] + reason = "waiting on RFC revision", + issue = "27729")] pub fn as_mut_slice(&mut self) -> &mut [T] { &mut self[..] } @@ -622,7 +624,8 @@ impl Vec { /// ``` #[inline] #[unstable(feature = "append", - reason = "new API, waiting for dust to settle")] + reason = "new API, waiting for dust to settle", + issue = "27765")] pub fn append(&mut self, other: &mut Self) { self.reserve(other.len()); let len = self.len(); @@ -661,7 +664,8 @@ impl Vec { /// assert_eq!(u, &[1, 2, 3]); /// ``` #[unstable(feature = "drain", - reason = "recently added, matches RFC")] + reason = "recently added, matches RFC", + issue = "27711")] pub fn drain(&mut self, range: R) -> Drain where R: RangeArgument { // Memory safety // @@ -762,7 +766,8 @@ impl Vec { /// ``` #[inline] #[unstable(feature = "split_off", - reason = "new API, waiting for dust to settle")] + reason = "new API, waiting for dust to settle", + issue = "27766")] pub fn split_off(&mut self, at: usize) -> Self { assert!(at <= self.len(), "`at` out of bounds"); @@ -804,7 +809,8 @@ impl Vec { /// assert_eq!(vec, [1, 2]); /// ``` #[unstable(feature = "vec_resize", - reason = "matches collection reform specification; waiting for dust to settle")] + reason = "matches collection reform specification; waiting for dust to settle", + issue = "27790")] pub fn resize(&mut self, new_len: usize, value: T) { let len = self.len(); @@ -854,7 +860,8 @@ impl Vec { /// ``` #[inline] #[unstable(feature = "vec_push_all", - reason = "likely to be replaced by a more optimized extend")] + reason = "likely to be replaced by a more optimized extend", + issue = "27744")] pub fn push_all(&mut self, other: &[T]) { self.reserve(other.len()); @@ -1495,7 +1502,7 @@ impl Drop for IntoIter { } /// A draining iterator for `Vec`. -#[unstable(feature = "drain", reason = "recently added")] +#[unstable(feature = "drain", reason = "recently added", issue = "27711")] pub struct Drain<'a, T: 'a> { /// Index of tail to preserve tail_start: usize, diff --git a/src/libcollections/vec_deque.rs b/src/libcollections/vec_deque.rs index 94cce8e1b1c5c..96e24b412d525 100644 --- a/src/libcollections/vec_deque.rs +++ b/src/libcollections/vec_deque.rs @@ -467,7 +467,8 @@ impl VecDeque { /// assert_eq!(Some(&5), buf.get(0)); /// ``` #[unstable(feature = "deque_extras", - reason = "matches collection reform specification; waiting on panic semantics")] + reason = "matches collection reform specification; waiting on panic semantics", + issue = "27788")] pub fn truncate(&mut self, len: usize) { for _ in len..self.len() { self.pop_back(); @@ -528,7 +529,8 @@ impl VecDeque { /// `VecDeque`. #[inline] #[unstable(feature = "deque_extras", - reason = "matches collection reform specification, waiting for dust to settle")] + reason = "matches collection reform specification, waiting for dust to settle", + issue = "27788")] pub fn as_slices(&self) -> (&[T], &[T]) { unsafe { let contiguous = self.is_contiguous(); @@ -548,7 +550,8 @@ impl VecDeque { /// `VecDeque`. #[inline] #[unstable(feature = "deque_extras", - reason = "matches collection reform specification, waiting for dust to settle")] + reason = "matches collection reform specification, waiting for dust to settle", + issue = "27788")] pub fn as_mut_slices(&mut self) -> (&mut [T], &mut [T]) { unsafe { let contiguous = self.is_contiguous(); @@ -615,7 +618,8 @@ impl VecDeque { /// ``` #[inline] #[unstable(feature = "drain", - reason = "matches collection reform specification, waiting for dust to settle")] + reason = "matches collection reform specification, waiting for dust to settle", + issue = "27711")] pub fn drain(&mut self) -> Drain { Drain { inner: self, @@ -864,7 +868,8 @@ impl VecDeque { /// assert_eq!(buf[1], 2); /// ``` #[unstable(feature = "deque_extras", - reason = "the naming of this function may be altered")] + reason = "the naming of this function may be altered", + issue = "27788")] pub fn swap_back_remove(&mut self, index: usize) -> Option { let length = self.len(); if length > 0 && index < length - 1 { @@ -901,7 +906,8 @@ impl VecDeque { /// assert_eq!(buf[1], 1); /// ``` #[unstable(feature = "deque_extras", - reason = "the naming of this function may be altered")] + reason = "the naming of this function may be altered", + issue = "27788")] pub fn swap_front_remove(&mut self, index: usize) -> Option { let length = self.len(); if length > 0 && index < length && index != 0 { @@ -1311,7 +1317,8 @@ impl VecDeque { /// ``` #[inline] #[unstable(feature = "split_off", - reason = "new API, waiting for dust to settle")] + reason = "new API, waiting for dust to settle", + issue = "27766")] pub fn split_off(&mut self, at: usize) -> Self { let len = self.len(); assert!(at <= len, "`at` out of bounds"); @@ -1375,7 +1382,8 @@ impl VecDeque { /// ``` #[inline] #[unstable(feature = "append", - reason = "new API, waiting for dust to settle")] + reason = "new API, waiting for dust to settle", + issue = "27765")] pub fn append(&mut self, other: &mut Self) { // naive impl self.extend(other.drain()); @@ -1402,7 +1410,8 @@ impl VecDeque { /// assert_eq!(&v[..], &[2, 4]); /// ``` #[unstable(feature = "vec_deque_retain", - reason = "new API, waiting for dust to settle")] + reason = "new API, waiting for dust to settle", + issue = "27767")] pub fn retain(&mut self, mut f: F) where F: FnMut(&T) -> bool { let len = self.len(); let mut del = 0; @@ -1441,7 +1450,8 @@ impl VecDeque { /// } /// ``` #[unstable(feature = "deque_extras", - reason = "matches collection reform specification; waiting on panic semantics")] + reason = "matches collection reform specification; waiting on panic semantics", + issue = "27788")] pub fn resize(&mut self, new_len: usize, value: T) { let len = self.len(); @@ -1610,7 +1620,8 @@ impl ExactSizeIterator for IntoIter {} /// A draining VecDeque iterator #[unstable(feature = "drain", - reason = "matches collection reform specification, waiting for dust to settle")] + reason = "matches collection reform specification, waiting for dust to settle", + issue = "27711")] pub struct Drain<'a, T: 'a> { inner: &'a mut VecDeque, }