Skip to content

Commit 9165a4e

Browse files
committed
Auto merge of #27818 - alexcrichton:tag-all-the-issues, r=aturon
This commit turns `#[unstable]` attributes missing an `issue` annotation into a hard error. This will require the libs team to ensure that there's a tracking issue for all unstable features in the standard library. All existing unstable features have had issues created and they've all been updated. Yay! Closes #26868
2 parents fc7efab + 8ef1e3b commit 9165a4e

File tree

131 files changed

+752
-539
lines changed

Some content is hidden

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

131 files changed

+752
-539
lines changed

src/liballoc/arc.rs

+12-8
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Arc<U>> for Arc<T> {}
137137
/// used to break cycles between `Arc` pointers.
138138
#[unsafe_no_drop_flag]
139139
#[unstable(feature = "arc_weak",
140-
reason = "Weak pointers may not belong in this module.")]
140+
reason = "Weak pointers may not belong in this module.",
141+
issue = "27718")]
141142
pub struct Weak<T: ?Sized> {
142143
// FIXME #12808: strange name to try to avoid interfering with
143144
// field accesses of the contained type via Deref
@@ -209,7 +210,8 @@ impl<T: ?Sized> Arc<T> {
209210
/// let weak_five = five.downgrade();
210211
/// ```
211212
#[unstable(feature = "arc_weak",
212-
reason = "Weak pointers may not belong in this module.")]
213+
reason = "Weak pointers may not belong in this module.",
214+
issue = "27718")]
213215
pub fn downgrade(&self) -> Weak<T> {
214216
loop {
215217
// This Relaxed is OK because we're checking the value in the CAS
@@ -234,14 +236,14 @@ impl<T: ?Sized> Arc<T> {
234236

235237
/// Get the number of weak references to this value.
236238
#[inline]
237-
#[unstable(feature = "arc_counts")]
239+
#[unstable(feature = "arc_counts", issue = "27718")]
238240
pub fn weak_count(this: &Arc<T>) -> usize {
239241
this.inner().weak.load(SeqCst) - 1
240242
}
241243

242244
/// Get the number of strong references to this value.
243245
#[inline]
244-
#[unstable(feature = "arc_counts")]
246+
#[unstable(feature = "arc_counts", issue = "27718")]
245247
pub fn strong_count(this: &Arc<T>) -> usize {
246248
this.inner().strong.load(SeqCst)
247249
}
@@ -349,7 +351,7 @@ impl<T: Clone> Arc<T> {
349351
/// let mut_five = Arc::make_unique(&mut five);
350352
/// ```
351353
#[inline]
352-
#[unstable(feature = "arc_unique")]
354+
#[unstable(feature = "arc_unique", issue = "27718")]
353355
pub fn make_unique(this: &mut Arc<T>) -> &mut T {
354356
// Note that we hold both a strong reference and a weak reference.
355357
// Thus, releasing our strong reference only will not, by itself, cause
@@ -427,7 +429,7 @@ impl<T: ?Sized> Arc<T> {
427429
/// # }
428430
/// ```
429431
#[inline]
430-
#[unstable(feature = "arc_unique")]
432+
#[unstable(feature = "arc_unique", issue = "27718")]
431433
pub fn get_mut(this: &mut Arc<T>) -> Option<&mut T> {
432434
if this.is_unique() {
433435
// This unsafety is ok because we're guaranteed that the pointer
@@ -541,7 +543,8 @@ impl<T: ?Sized> Drop for Arc<T> {
541543
}
542544

543545
#[unstable(feature = "arc_weak",
544-
reason = "Weak pointers may not belong in this module.")]
546+
reason = "Weak pointers may not belong in this module.",
547+
issue = "27718")]
545548
impl<T: ?Sized> Weak<T> {
546549
/// Upgrades a weak reference to a strong reference.
547550
///
@@ -589,7 +592,8 @@ impl<T: ?Sized> Weak<T> {
589592
}
590593

591594
#[unstable(feature = "arc_weak",
592-
reason = "Weak pointers may not belong in this module.")]
595+
reason = "Weak pointers may not belong in this module.",
596+
issue = "27718")]
593597
impl<T: ?Sized> Clone for Weak<T> {
594598
/// Makes a clone of the `Weak<T>`.
595599
///

src/liballoc/boxed.rs

+12-6
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,15 @@ use core::raw::{TraitObject};
8585
/// ```
8686
#[lang = "exchange_heap"]
8787
#[unstable(feature = "box_heap",
88-
reason = "may be renamed; uncertain about custom allocator design")]
88+
reason = "may be renamed; uncertain about custom allocator design",
89+
issue = "27779")]
8990
pub const HEAP: ExchangeHeapSingleton =
9091
ExchangeHeapSingleton { _force_singleton: () };
9192

9293
/// This the singleton type used solely for `boxed::HEAP`.
9394
#[unstable(feature = "box_heap",
94-
reason = "may be renamed; uncertain about custom allocator design")]
95+
reason = "may be renamed; uncertain about custom allocator design",
96+
issue = "27779")]
9597
#[derive(Copy, Clone)]
9698
pub struct ExchangeHeapSingleton { _force_singleton: () }
9799

@@ -121,7 +123,9 @@ pub struct Box<T: ?Sized>(Unique<T>);
121123
/// the fact that the `align_of` intrinsic currently requires the
122124
/// input type to be Sized (which I do not think is strictly
123125
/// necessary).
124-
#[unstable(feature = "placement_in", reason = "placement box design is still being worked out.")]
126+
#[unstable(feature = "placement_in",
127+
reason = "placement box design is still being worked out.",
128+
issue = "27779")]
125129
pub struct IntermediateBox<T: ?Sized>{
126130
ptr: *mut u8,
127131
size: usize,
@@ -222,7 +226,8 @@ impl<T : ?Sized> Box<T> {
222226
/// lead to memory problems like double-free, for example if the
223227
/// function is called twice on the same raw pointer.
224228
#[unstable(feature = "box_raw",
225-
reason = "may be renamed or moved out of Box scope")]
229+
reason = "may be renamed or moved out of Box scope",
230+
issue = "27768")]
226231
#[inline]
227232
// NB: may want to be called from_ptr, see comments on CStr::from_ptr
228233
pub unsafe fn from_raw(raw: *mut T) -> Self {
@@ -245,7 +250,8 @@ impl<T : ?Sized> Box<T> {
245250
/// let raw = Box::into_raw(seventeen);
246251
/// let boxed_again = unsafe { Box::from_raw(raw) };
247252
/// ```
248-
#[unstable(feature = "box_raw", reason = "may be renamed")]
253+
#[unstable(feature = "box_raw", reason = "may be renamed",
254+
issue = "27768")]
249255
#[inline]
250256
// NB: may want to be called into_ptr, see comments on CStr::from_ptr
251257
pub fn into_raw(b: Box<T>) -> *mut T {
@@ -470,7 +476,7 @@ impl<I: ExactSizeIterator + ?Sized> ExactSizeIterator for Box<I> {}
470476
/// }
471477
/// ```
472478
#[rustc_paren_sugar]
473-
#[unstable(feature = "fnbox", reason = "Newly introduced")]
479+
#[unstable(feature = "fnbox", reason = "Newly introduced", issue = "0")]
474480
pub trait FnBox<A> {
475481
type Output;
476482

src/liballoc/heap.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
reason = "the precise API and guarantees it provides may be tweaked \
1313
slightly, especially to possibly take into account the \
1414
types being stored to make room for a future \
15-
tracing garbage collector")]
15+
tracing garbage collector",
16+
issue = "27700")]
1617

1718
use core::{isize, usize};
1819

src/liballoc/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
#![allow(unused_attributes)]
6565
#![unstable(feature = "alloc",
6666
reason = "this library is unlikely to be stabilized in its current \
67-
form or name")]
67+
form or name",
68+
issue = "27783")]
6869
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk-v2.png",
6970
html_favicon_url = "https://doc.rust-lang.org/favicon.ico",
7071
html_root_url = "https://doc.rust-lang.org/nightly/",
@@ -131,7 +132,8 @@ pub mod raw_vec;
131132
/// Common out-of-memory routine
132133
#[cold]
133134
#[inline(never)]
134-
#[unstable(feature = "oom", reason = "not a scrutinized interface")]
135+
#[unstable(feature = "oom", reason = "not a scrutinized interface",
136+
issue = "27700")]
135137
pub fn oom() -> ! {
136138
// FIXME(#14674): This really needs to do something other than just abort
137139
// here, but any printing done must be *guaranteed* to not

src/liballoc/rc.rs

+14-10
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ impl<T> Rc<T> {
238238
/// assert_eq!(Rc::try_unwrap(x), Err(Rc::new(4)));
239239
/// ```
240240
#[inline]
241-
#[unstable(feature = "rc_unique")]
241+
#[unstable(feature = "rc_unique", issue = "27718")]
242242
pub fn try_unwrap(rc: Rc<T>) -> Result<T, Rc<T>> {
243243
if Rc::is_unique(&rc) {
244244
unsafe {
@@ -271,20 +271,21 @@ impl<T: ?Sized> Rc<T> {
271271
/// let weak_five = five.downgrade();
272272
/// ```
273273
#[unstable(feature = "rc_weak",
274-
reason = "Weak pointers may not belong in this module")]
274+
reason = "Weak pointers may not belong in this module",
275+
issue = "27718")]
275276
pub fn downgrade(&self) -> Weak<T> {
276277
self.inc_weak();
277278
Weak { _ptr: self._ptr }
278279
}
279280

280281
/// Get the number of weak references to this value.
281282
#[inline]
282-
#[unstable(feature = "rc_counts")]
283+
#[unstable(feature = "rc_counts", issue = "27718")]
283284
pub fn weak_count(this: &Rc<T>) -> usize { this.weak() - 1 }
284285

285286
/// Get the number of strong references to this value.
286287
#[inline]
287-
#[unstable(feature = "rc_counts")]
288+
#[unstable(feature = "rc_counts", issue= "27718")]
288289
pub fn strong_count(this: &Rc<T>) -> usize { this.strong() }
289290

290291
/// Returns true if there are no other `Rc` or `Weak<T>` values that share
@@ -302,7 +303,7 @@ impl<T: ?Sized> Rc<T> {
302303
/// assert!(Rc::is_unique(&five));
303304
/// ```
304305
#[inline]
305-
#[unstable(feature = "rc_unique")]
306+
#[unstable(feature = "rc_unique", issue = "27718")]
306307
pub fn is_unique(rc: &Rc<T>) -> bool {
307308
Rc::weak_count(rc) == 0 && Rc::strong_count(rc) == 1
308309
}
@@ -327,7 +328,7 @@ impl<T: ?Sized> Rc<T> {
327328
/// assert!(Rc::get_mut(&mut x).is_none());
328329
/// ```
329330
#[inline]
330-
#[unstable(feature = "rc_unique")]
331+
#[unstable(feature = "rc_unique", issue = "27718")]
331332
pub fn get_mut(rc: &mut Rc<T>) -> Option<&mut T> {
332333
if Rc::is_unique(rc) {
333334
let inner = unsafe { &mut **rc._ptr };
@@ -356,7 +357,7 @@ impl<T: Clone> Rc<T> {
356357
/// let mut_five = five.make_unique();
357358
/// ```
358359
#[inline]
359-
#[unstable(feature = "rc_unique")]
360+
#[unstable(feature = "rc_unique", issue = "27718")]
360361
pub fn make_unique(&mut self) -> &mut T {
361362
if !Rc::is_unique(self) {
362363
*self = Rc::new((**self).clone())
@@ -653,7 +654,8 @@ impl<T> fmt::Pointer for Rc<T> {
653654
/// See the [module level documentation](./index.html) for more.
654655
#[unsafe_no_drop_flag]
655656
#[unstable(feature = "rc_weak",
656-
reason = "Weak pointers may not belong in this module.")]
657+
reason = "Weak pointers may not belong in this module.",
658+
issue = "27718")]
657659
pub struct Weak<T: ?Sized> {
658660
// FIXME #12808: strange names to try to avoid interfering with
659661
// field accesses of the contained type via Deref
@@ -666,7 +668,8 @@ impl<T: ?Sized> !marker::Sync for Weak<T> {}
666668
impl<T: ?Sized+Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
667669

668670
#[unstable(feature = "rc_weak",
669-
reason = "Weak pointers may not belong in this module.")]
671+
reason = "Weak pointers may not belong in this module.",
672+
issue = "27718")]
670673
impl<T: ?Sized> Weak<T> {
671674

672675
/// Upgrades a weak reference to a strong reference.
@@ -746,7 +749,8 @@ impl<T: ?Sized> Drop for Weak<T> {
746749
}
747750

748751
#[unstable(feature = "rc_weak",
749-
reason = "Weak pointers may not belong in this module.")]
752+
reason = "Weak pointers may not belong in this module.",
753+
issue = "27718")]
750754
impl<T: ?Sized> Clone for Weak<T> {
751755

752756
/// Makes a clone of the `Weak<T>`.

src/liballoc_jemalloc/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
#![cfg_attr(not(stage0), allocator)]
1717
#![unstable(feature = "alloc_jemalloc",
1818
reason = "this library is unlikely to be stabilized in its current \
19-
form or name")]
19+
form or name",
20+
issue = "27783")]
2021
#![feature(allocator)]
2122
#![feature(libc)]
2223
#![feature(no_std)]

src/liballoc_system/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
#![cfg_attr(not(stage0), allocator)]
1717
#![unstable(feature = "alloc_system",
1818
reason = "this library is unlikely to be stabilized in its current \
19-
form or name")]
19+
form or name",
20+
issue = "27783")]
2021
#![feature(allocator)]
2122
#![feature(libc)]
2223
#![feature(no_std)]

src/libarena/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
// Do not remove on snapshot creation. Needed for bootstrap. (Issue #22364)
2323
#![cfg_attr(stage0, feature(custom_attribute))]
2424
#![crate_name = "arena"]
25-
#![unstable(feature = "rustc_private")]
25+
#![unstable(feature = "rustc_private", issue = "27812")]
2626
#![staged_api]
2727
#![crate_type = "rlib"]
2828
#![crate_type = "dylib"]

src/libcollections/binary_heap.rs

+3-2
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

+2-1
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

+7-2
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

+4-2
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

+2-1
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

+3-2
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.

0 commit comments

Comments
 (0)