Skip to content

Commit 377c11a

Browse files
committed
collections: Add issues for unstable features
1 parent 3263d41 commit 377c11a

File tree

13 files changed

+120
-65
lines changed

13 files changed

+120
-65
lines changed

src/libcollections/binary_heap.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,8 @@ impl<T: Ord> BinaryHeap<T> {
547547
#[inline]
548548
#[unstable(feature = "drain",
549549
reason = "matches collection reform specification, \
550-
waiting for dust to settle")]
550+
waiting for dust to settle",
551+
issue = "27711")]
551552
pub fn drain(&mut self) -> Drain<T> {
552553
Drain { iter: self.data.drain(..) }
553554
}
@@ -685,7 +686,7 @@ impl<T> DoubleEndedIterator for IntoIter<T> {
685686
impl<T> ExactSizeIterator for IntoIter<T> {}
686687

687688
/// An iterator that drains a `BinaryHeap`.
688-
#[unstable(feature = "drain", reason = "recent addition")]
689+
#[unstable(feature = "drain", reason = "recent addition", issue = "27711")]
689690
pub struct Drain<'a, T: 'a> {
690691
iter: vec::Drain<'a, T>,
691692
}

src/libcollections/borrow.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ impl<'a, B: ?Sized> Hash for Cow<'a, B> where B: Hash + ToOwned
344344
}
345345

346346
/// Trait for moving into a `Cow`.
347-
#[unstable(feature = "into_cow", reason = "may be replaced by `convert::Into`")]
347+
#[unstable(feature = "into_cow", reason = "may be replaced by `convert::Into`",
348+
issue = "27735")]
348349
pub trait IntoCow<'a, B: ?Sized> where B: ToOwned {
349350
/// Moves `self` into `Cow`
350351
fn into_cow(self) -> Cow<'a, B>;

src/libcollections/btree/map.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ impl<K: Ord, V> BTreeMap<K, V> {
157157
/// Makes a new empty BTreeMap with the given B.
158158
///
159159
/// B cannot be less than 2.
160+
#[unstable(feature = "btree_b",
161+
reason = "probably want this to be on the type, eventually",
162+
issue = "27795")]
160163
pub fn with_b(b: usize) -> BTreeMap<K, V> {
161164
assert!(b > 1, "B must be greater than 1");
162165
BTreeMap {
@@ -1504,7 +1507,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
15041507
/// assert_eq!(Some((&5, &"b")), map.range(Included(&4), Unbounded).next());
15051508
/// ```
15061509
#[unstable(feature = "btree_range",
1507-
reason = "matches collection reform specification, waiting for dust to settle")]
1510+
reason = "matches collection reform specification, waiting for dust to settle",
1511+
issue = "27787")]
15081512
pub fn range<Min: ?Sized + Ord = K, Max: ?Sized + Ord = K>(&self, min: Bound<&Min>,
15091513
max: Bound<&Max>)
15101514
-> Range<K, V> where
@@ -1537,7 +1541,8 @@ impl<K: Ord, V> BTreeMap<K, V> {
15371541
/// }
15381542
/// ```
15391543
#[unstable(feature = "btree_range",
1540-
reason = "matches collection reform specification, waiting for dust to settle")]
1544+
reason = "matches collection reform specification, waiting for dust to settle",
1545+
issue = "27787")]
15411546
pub fn range_mut<Min: ?Sized + Ord = K, Max: ?Sized + Ord = K>(&mut self, min: Bound<&Min>,
15421547
max: Bound<&Max>)
15431548
-> RangeMut<K, V> where

src/libcollections/btree/set.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,8 @@ impl<T: Ord> BTreeSet<T> {
101101
///
102102
/// B cannot be less than 2.
103103
#[unstable(feature = "btree_b",
104-
reason = "probably want this to be on the type, eventually")]
104+
reason = "probably want this to be on the type, eventually",
105+
issue = "27795")]
105106
pub fn with_b(b: usize) -> BTreeSet<T> {
106107
BTreeSet { map: BTreeMap::with_b(b) }
107108
}
@@ -154,7 +155,8 @@ impl<T: Ord> BTreeSet<T> {
154155
/// assert_eq!(Some(&5), set.range(Included(&4), Unbounded).next());
155156
/// ```
156157
#[unstable(feature = "btree_range",
157-
reason = "matches collection reform specification, waiting for dust to settle")]
158+
reason = "matches collection reform specification, waiting for dust to settle",
159+
issue = "27787")]
158160
pub fn range<'a, Min: ?Sized + Ord = T, Max: ?Sized + Ord = T>(&'a self, min: Bound<&Min>,
159161
max: Bound<&Max>)
160162
-> Range<'a, T> where

src/libcollections/enum_set.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
1616
#![unstable(feature = "enumset",
1717
reason = "matches collection reform specification, \
18-
waiting for dust to settle")]
18+
waiting for dust to settle",
19+
issue = "0")]
1920

2021
use core::marker;
2122
use core::fmt;

src/libcollections/lib.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
#![crate_type = "rlib"]
2121
#![unstable(feature = "collections",
2222
reason = "library is unlikely to be stabilized with the current \
23-
layout and name, use std::collections instead")]
23+
layout and name, use std::collections instead",
24+
issue = "27783")]
2425
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
2526
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
2627
html_root_url = "https://doc.rust-lang.org/nightly/",
@@ -110,7 +111,7 @@ mod std {
110111
}
111112

112113
/// An endpoint of a range of keys.
113-
#[unstable(feature = "collections_bound")]
114+
#[unstable(feature = "collections_bound", issue = "27711")]
114115
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
115116
pub enum Bound<T> {
116117
/// An inclusive bound.

src/libcollections/linked_list.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,7 +801,8 @@ impl<'a, A> IterMut<'a, A> {
801801
/// ```
802802
#[inline]
803803
#[unstable(feature = "linked_list_extras",
804-
reason = "this is probably better handled by a cursor type -- we'll see")]
804+
reason = "this is probably better handled by a cursor type -- we'll see",
805+
issue = "27794")]
805806
pub fn insert_next(&mut self, elt: A) {
806807
self.insert_next_node(box Node::new(elt))
807808
}
@@ -825,7 +826,8 @@ impl<'a, A> IterMut<'a, A> {
825826
/// ```
826827
#[inline]
827828
#[unstable(feature = "linked_list_extras",
828-
reason = "this is probably better handled by a cursor type -- we'll see")]
829+
reason = "this is probably better handled by a cursor type -- we'll see",
830+
issue = "27794")]
829831
pub fn peek_next(&mut self) -> Option<&mut A> {
830832
if self.nelem == 0 {
831833
return None

src/libcollections/range.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![unstable(feature = "collections_range", reason = "was just added")]
11+
#![unstable(feature = "collections_range", reason = "was just added",
12+
issue = "27711")]
1213

1314
//! Range syntax.
1415

src/libcollections/slice.rs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -214,29 +214,29 @@ impl<T> [T] {
214214
}
215215

216216
/// Returns the first and all the rest of the elements of a slice.
217-
#[unstable(feature = "slice_splits", reason = "new API")]
217+
#[unstable(feature = "slice_splits", reason = "new API", issue = "27742")]
218218
#[inline]
219219
pub fn split_first(&self) -> Option<(&T, &[T])> {
220220
core_slice::SliceExt::split_first(self)
221221
}
222222

223223
/// Returns the first and all the rest of the elements of a slice.
224-
#[unstable(feature = "slice_splits", reason = "new API")]
224+
#[unstable(feature = "slice_splits", reason = "new API", issue = "27742")]
225225
#[inline]
226226
pub fn split_first_mut(&mut self) -> Option<(&mut T, &mut [T])> {
227227
core_slice::SliceExt::split_first_mut(self)
228228
}
229229

230230
/// Returns the last and all the rest of the elements of a slice.
231-
#[unstable(feature = "slice_splits", reason = "new API")]
231+
#[unstable(feature = "slice_splits", reason = "new API", issue = "27742")]
232232
#[inline]
233233
pub fn split_last(&self) -> Option<(&T, &[T])> {
234234
core_slice::SliceExt::split_last(self)
235235

236236
}
237237

238238
/// Returns the last and all the rest of the elements of a slice.
239-
#[unstable(feature = "slice_splits", since = "1.3.0")]
239+
#[unstable(feature = "slice_splits", reason = "new API", issue = "27742")]
240240
#[inline]
241241
pub fn split_last_mut(&mut self) -> Option<(&mut T, &mut [T])> {
242242
core_slice::SliceExt::split_last_mut(self)
@@ -785,7 +785,7 @@ impl<T> [T] {
785785
/// assert!(dst.clone_from_slice(&src2) == 3);
786786
/// assert!(dst == [3, 4, 5]);
787787
/// ```
788-
#[unstable(feature = "clone_from_slice")]
788+
#[unstable(feature = "clone_from_slice", issue = "27750")]
789789
pub fn clone_from_slice(&mut self, src: &[T]) -> usize where T: Clone {
790790
core_slice::SliceExt::clone_from_slice(self, src)
791791
}
@@ -811,11 +811,13 @@ impl<T> [T] {
811811
// Extension traits for slices over specific kinds of data
812812
////////////////////////////////////////////////////////////////////////////////
813813
#[unstable(feature = "slice_concat_ext",
814-
reason = "trait should not have to exist")]
814+
reason = "trait should not have to exist",
815+
issue = "27747")]
815816
/// An extension trait for concatenating slices
816817
pub trait SliceConcatExt<T: ?Sized> {
817818
#[unstable(feature = "slice_concat_ext",
818-
reason = "trait should not have to exist")]
819+
reason = "trait should not have to exist",
820+
issue = "27747")]
819821
/// The resulting type after concatenation
820822
type Output;
821823

src/libcollections/str.rs

Lines changed: 31 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ impl<S: Borrow<str>> SliceConcatExt<str> for [S] {
105105
///
106106
/// For use with the `std::iter` module.
107107
#[derive(Clone)]
108-
#[unstable(feature = "str_utf16")]
108+
#[unstable(feature = "str_utf16", issue = "27714")]
109109
pub struct Utf16Units<'a> {
110110
encoder: Utf16Encoder<Chars<'a>>
111111
}
@@ -211,7 +211,8 @@ impl str {
211211
reason = "it is unclear whether this method pulls its weight \
212212
with the existence of the char_indices iterator or \
213213
this method may want to be replaced with checked \
214-
slicing")]
214+
slicing",
215+
issue = "27754")]
215216
#[inline]
216217
pub fn is_char_boundary(&self, index: usize) -> bool {
217218
core_str::StrExt::is_char_boundary(self, index)
@@ -275,7 +276,8 @@ impl str {
275276
/// Takes a bytewise mutable slice from a string.
276277
///
277278
/// Same as `slice_unchecked`, but works with `&mut str` instead of `&str`.
278-
#[unstable(feature = "str_slice_mut", reason = "recently added")]
279+
#[unstable(feature = "str_slice_mut", reason = "recently added",
280+
issue = "27793")]
279281
#[inline]
280282
pub unsafe fn slice_mut_unchecked(&mut self, begin: usize, end: usize) -> &mut str {
281283
core_str::StrExt::slice_mut_unchecked(self, begin, end)
@@ -329,7 +331,8 @@ impl str {
329331
#[unstable(feature = "str_char",
330332
reason = "often replaced by char_indices, this method may \
331333
be removed in favor of just char_at() or eventually \
332-
removed altogether")]
334+
removed altogether",
335+
issue = "27754")]
333336
#[inline]
334337
pub fn char_range_at(&self, start: usize) -> CharRange {
335338
core_str::StrExt::char_range_at(self, start)
@@ -388,7 +391,8 @@ impl str {
388391
#[unstable(feature = "str_char",
389392
reason = "often replaced by char_indices, this method may \
390393
be removed in favor of just char_at_reverse() or \
391-
eventually removed altogether")]
394+
eventually removed altogether",
395+
issue = "27754")]
392396
#[inline]
393397
pub fn char_range_at_reverse(&self, start: usize) -> CharRange {
394398
core_str::StrExt::char_range_at_reverse(self, start)
@@ -416,7 +420,8 @@ impl str {
416420
method may be removed or possibly renamed in the \
417421
future; it is normally replaced by chars/char_indices \
418422
iterators or by getting the first char from a \
419-
subslice")]
423+
subslice",
424+
issue = "27754")]
420425
#[inline]
421426
pub fn char_at(&self, i: usize) -> char {
422427
core_str::StrExt::char_at(self, i)
@@ -443,7 +448,8 @@ impl str {
443448
#[unstable(feature = "str_char",
444449
reason = "see char_at for more details, but reverse semantics \
445450
are also somewhat unclear, especially with which \
446-
cases generate panics")]
451+
cases generate panics",
452+
issue = "27754")]
447453
#[inline]
448454
pub fn char_at_reverse(&self, i: usize) -> char {
449455
core_str::StrExt::char_at_reverse(self, i)
@@ -478,7 +484,8 @@ impl str {
478484
#[unstable(feature = "str_char",
479485
reason = "awaiting conventions about shifting and slices and \
480486
may not be warranted with the existence of the chars \
481-
and/or char_indices iterators")]
487+
and/or char_indices iterators",
488+
issue = "27754")]
482489
#[inline]
483490
pub fn slice_shift_char(&self) -> Option<(char, &str)> {
484491
core_str::StrExt::slice_shift_char(self)
@@ -508,14 +515,16 @@ impl str {
508515
/// assert_eq!(b, " 老虎 Léopard");
509516
/// ```
510517
#[inline]
511-
#[unstable(feature = "str_split_at", reason = "recently added")]
518+
#[unstable(feature = "str_split_at", reason = "recently added",
519+
issue = "27792")]
512520
pub fn split_at(&self, mid: usize) -> (&str, &str) {
513521
core_str::StrExt::split_at(self, mid)
514522
}
515523

516524
/// Divide one mutable string slice into two at an index.
517525
#[inline]
518-
#[unstable(feature = "str_split_at", reason = "recently added")]
526+
#[unstable(feature = "str_split_at", reason = "recently added",
527+
issue = "27792")]
519528
pub fn split_at_mut(&mut self, mid: usize) -> (&mut str, &mut str) {
520529
core_str::StrExt::split_at_mut(self, mid)
521530
}
@@ -652,7 +661,8 @@ impl str {
652661

653662
/// Returns an iterator of `u16` over the string encoded as UTF-16.
654663
#[unstable(feature = "str_utf16",
655-
reason = "this functionality may only be provided by libunicode")]
664+
reason = "this functionality may only be provided by libunicode",
665+
issue = "27714")]
656666
pub fn utf16_units(&self) -> Utf16Units {
657667
Utf16Units { encoder: Utf16Encoder::new(self[..].chars()) }
658668
}
@@ -1186,7 +1196,8 @@ impl str {
11861196
/// assert_eq!(v, [(0, 3)]); // only the first `aba`
11871197
/// ```
11881198
#[unstable(feature = "str_match_indices",
1189-
reason = "might have its iterator type changed")]
1199+
reason = "might have its iterator type changed",
1200+
issue = "27743")]
11901201
// NB: Right now MatchIndices yields `(usize, usize)`, but it would
11911202
// be more consistent with `matches` and `char_indices` to return `(usize, &str)`
11921203
pub fn match_indices<'a, P: Pattern<'a>>(&'a self, pat: P) -> MatchIndices<'a, P> {
@@ -1231,7 +1242,8 @@ impl str {
12311242
/// assert_eq!(v, [(2, 5)]); // only the last `aba`
12321243
/// ```
12331244
#[unstable(feature = "str_match_indices",
1234-
reason = "might have its iterator type changed")]
1245+
reason = "might have its iterator type changed",
1246+
issue = "27743")]
12351247
// NB: Right now RMatchIndices yields `(usize, usize)`, but it would
12361248
// be more consistent with `rmatches` and `char_indices` to return `(usize, &str)`
12371249
pub fn rmatch_indices<'a, P: Pattern<'a>>(&'a self, pat: P) -> RMatchIndices<'a, P>
@@ -1476,21 +1488,24 @@ impl str {
14761488

14771489
/// Escapes each char in `s` with `char::escape_default`.
14781490
#[unstable(feature = "str_escape",
1479-
reason = "return type may change to be an iterator")]
1491+
reason = "return type may change to be an iterator",
1492+
issue = "27791")]
14801493
pub fn escape_default(&self) -> String {
14811494
self.chars().flat_map(|c| c.escape_default()).collect()
14821495
}
14831496

14841497
/// Escapes each char in `s` with `char::escape_unicode`.
14851498
#[unstable(feature = "str_escape",
1486-
reason = "return type may change to be an iterator")]
1499+
reason = "return type may change to be an iterator",
1500+
issue = "27791")]
14871501
pub fn escape_unicode(&self) -> String {
14881502
self.chars().flat_map(|c| c.escape_unicode()).collect()
14891503
}
14901504

14911505
/// Converts the `Box<str>` into a `String` without copying or allocating.
14921506
#[unstable(feature = "box_str",
1493-
reason = "recently added, matches RFC")]
1507+
reason = "recently added, matches RFC",
1508+
issue = "27785")]
14941509
pub fn into_string(self: Box<str>) -> String {
14951510
unsafe {
14961511
let slice = mem::transmute::<Box<str>, Box<[u8]>>(self);

0 commit comments

Comments
 (0)