Skip to content

Commit 5f62562

Browse files
committed
std: Add issues to all unstable features
1 parent 377c11a commit 5f62562

Some content is hidden

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

41 files changed

+272
-223
lines changed

src/libcore/num/dec2flt/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@
9292
9393
#![doc(hidden)]
9494
#![unstable(feature = "dec2flt",
95-
reason = "internal routines only exposed for testing")]
95+
reason = "internal routines only exposed for testing",
96+
issue = "0")]
9697

9798
use prelude::v1::*;
9899
use num::ParseFloatError as PFE;

src/libstd/ascii.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ pub trait AsciiExt {
117117
///
118118
/// assert_eq!('A', ascii);
119119
/// ```
120-
#[unstable(feature = "ascii")]
120+
#[unstable(feature = "ascii", issue = "27809")]
121121
fn make_ascii_uppercase(&mut self);
122122

123123
/// Converts this type to its ASCII lower case equivalent in-place.
@@ -137,7 +137,7 @@ pub trait AsciiExt {
137137
///
138138
/// assert_eq!('a', ascii);
139139
/// ```
140-
#[unstable(feature = "ascii")]
140+
#[unstable(feature = "ascii", issue = "27809")]
141141
fn make_ascii_lowercase(&mut self);
142142
}
143143

src/libstd/collections/hash/map.rs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,8 @@ impl<K, V, S> HashMap<K, V, S>
553553
/// map.insert(1, 2);
554554
/// ```
555555
#[inline]
556-
#[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear")]
556+
#[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear",
557+
issue = "27713")]
557558
pub fn with_hash_state(hash_state: S) -> HashMap<K, V, S> {
558559
HashMap {
559560
hash_state: hash_state,
@@ -583,7 +584,8 @@ impl<K, V, S> HashMap<K, V, S>
583584
/// map.insert(1, 2);
584585
/// ```
585586
#[inline]
586-
#[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear")]
587+
#[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear",
588+
issue = "27713")]
587589
pub fn with_capacity_and_hash_state(capacity: usize, hash_state: S)
588590
-> HashMap<K, V, S> {
589591
let resize_policy = DefaultResizePolicy::new();
@@ -998,7 +1000,8 @@ impl<K, V, S> HashMap<K, V, S>
9981000
/// ```
9991001
#[inline]
10001002
#[unstable(feature = "drain",
1001-
reason = "matches collection reform specification, waiting for dust to settle")]
1003+
reason = "matches collection reform specification, waiting for dust to settle",
1004+
issue = "27711")]
10021005
pub fn drain(&mut self) -> Drain<K, V> {
10031006
fn last_two<A, B, C>((_, b, c): (A, B, C)) -> (B, C) { (b, c) }
10041007
let last_two: fn((SafeHash, K, V)) -> (K, V) = last_two; // coerce to fn pointer
@@ -1311,7 +1314,8 @@ impl<'a, K, V> Clone for Values<'a, K, V> {
13111314

13121315
/// HashMap drain iterator.
13131316
#[unstable(feature = "drain",
1314-
reason = "matches collection reform specification, waiting for dust to settle")]
1317+
reason = "matches collection reform specification, waiting for dust to settle",
1318+
issue = "27711")]
13151319
pub struct Drain<'a, K: 'a, V: 'a> {
13161320
inner: iter::Map<table::Drain<'a, K, V>, fn((SafeHash, K, V)) -> (K, V)>
13171321
}
@@ -1587,14 +1591,16 @@ impl<K, V, S> Extend<(K, V)> for HashMap<K, V, S>
15871591
/// instances are unlikely to produce the same result for the same values.
15881592
#[derive(Clone)]
15891593
#[unstable(feature = "hashmap_hasher",
1590-
reason = "hashing an hash maps may be altered")]
1594+
reason = "hashing an hash maps may be altered",
1595+
issue = "27713")]
15911596
pub struct RandomState {
15921597
k0: u64,
15931598
k1: u64,
15941599
}
15951600

15961601
#[unstable(feature = "hashmap_hasher",
1597-
reason = "hashing an hash maps may be altered")]
1602+
reason = "hashing an hash maps may be altered",
1603+
issue = "27713")]
15981604
impl RandomState {
15991605
/// Constructs a new `RandomState` that is initialized with random keys.
16001606
#[inline]
@@ -1606,7 +1612,8 @@ impl RandomState {
16061612
}
16071613

16081614
#[unstable(feature = "hashmap_hasher",
1609-
reason = "hashing an hash maps may be altered")]
1615+
reason = "hashing an hash maps may be altered",
1616+
issue = "27713")]
16101617
impl HashState for RandomState {
16111618
type Hasher = SipHasher;
16121619
#[inline]

src/libstd/collections/hash/set.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ impl<T, S> HashSet<T, S>
164164
/// set.insert(2);
165165
/// ```
166166
#[inline]
167-
#[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear")]
167+
#[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear",
168+
issue = "27713")]
168169
pub fn with_hash_state(hash_state: S) -> HashSet<T, S> {
169170
HashSet::with_capacity_and_hash_state(INITIAL_CAPACITY, hash_state)
170171
}
@@ -190,7 +191,8 @@ impl<T, S> HashSet<T, S>
190191
/// set.insert(1);
191192
/// ```
192193
#[inline]
193-
#[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear")]
194+
#[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear",
195+
issue = "27713")]
194196
pub fn with_capacity_and_hash_state(capacity: usize, hash_state: S)
195197
-> HashSet<T, S> {
196198
HashSet {
@@ -411,7 +413,8 @@ impl<T, S> HashSet<T, S>
411413
/// Clears the set, returning all elements in an iterator.
412414
#[inline]
413415
#[unstable(feature = "drain",
414-
reason = "matches collection reform specification, waiting for dust to settle")]
416+
reason = "matches collection reform specification, waiting for dust to settle",
417+
issue = "27711")]
415418
pub fn drain(&mut self) -> Drain<T> {
416419
fn first<A, B>((a, _): (A, B)) -> A { a }
417420
let first: fn((T, ())) -> T = first; // coerce to fn pointer

src/libstd/collections/hash/state.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 = "hashmap_hasher", reason = "hasher stuff is unclear")]
11+
#![unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear",
12+
issue = "27713")]
1213

1314
use clone::Clone;
1415
use default::Default;

src/libstd/collections/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,8 @@ pub mod hash_set {
410410

411411
/// Experimental support for providing custom hash algorithms to a HashMap and
412412
/// HashSet.
413-
#[unstable(feature = "hashmap_hasher", reason = "module was recently added")]
413+
#[unstable(feature = "hashmap_hasher", reason = "module was recently added",
414+
issue = "27713")]
414415
pub mod hash_state {
415416
pub use super::hash::state::*;
416417
}

src/libstd/dynamic_lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@
1414
1515
#![unstable(feature = "dynamic_lib",
1616
reason = "API has not been scrutinized and is highly likely to \
17-
either disappear or change")]
17+
either disappear or change",
18+
issue = "27810")]
1819
#![allow(missing_docs)]
1920

2021
use prelude::v1::*;

src/libstd/error.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@ pub trait Error: Debug + Display + Reflect {
7878
/// Get the `TypeId` of `self`
7979
#[doc(hidden)]
8080
#[unstable(feature = "error_type_id",
81-
reason = "unclear whether to commit to this public implementation detail")]
81+
reason = "unclear whether to commit to this public implementation detail",
82+
issue = "27745")]
8283
fn type_id(&self) -> TypeId where Self: 'static {
8384
TypeId::of::<Self>()
8485
}

src/libstd/ffi/c_str.rs

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,8 @@ impl CString {
205205
/// The only appropriate argument is a pointer obtained by calling
206206
/// `into_ptr`. The length of the string will be recalculated
207207
/// using the pointer.
208-
#[unstable(feature = "cstr_memory", reason = "recently added")]
208+
#[unstable(feature = "cstr_memory", reason = "recently added",
209+
issue = "27769")]
209210
// NB: may want to be called from_raw, needs to consider CStr::from_ptr,
210211
// Box::from_raw (or whatever it's currently called), and
211212
// slice::from_raw_parts
@@ -223,7 +224,8 @@ impl CString {
223224
/// this string.
224225
///
225226
/// Failure to call `from_ptr` will lead to a memory leak.
226-
#[unstable(feature = "cstr_memory", reason = "recently added")]
227+
#[unstable(feature = "cstr_memory", reason = "recently added",
228+
issue = "27769")]
227229
// NB: may want to be called into_raw, see comments on from_ptr
228230
pub fn into_ptr(self) -> *const libc::c_char {
229231
// It is important that the bytes be sized to fit - we need
@@ -407,11 +409,13 @@ impl CStr {
407409
/// > after a 0-cost cast, but it is planned to alter its definition in the
408410
/// > future to perform the length calculation in addition to the UTF-8
409411
/// > check whenever this method is called.
410-
#[unstable(feature = "cstr_to_str", reason = "recently added")]
412+
#[unstable(feature = "cstr_to_str", reason = "recently added",
413+
issue = "27764")]
411414
pub fn to_str(&self) -> Result<&str, str::Utf8Error> {
412-
// NB: When CStr is changed to perform the length check in .to_bytes() instead of in
413-
// from_ptr(), it may be worth considering if this should be rewritten to do the UTF-8
414-
// check inline with the length calculation instead of doing it afterwards.
415+
// NB: When CStr is changed to perform the length check in .to_bytes()
416+
// instead of in from_ptr(), it may be worth considering if this should
417+
// be rewritten to do the UTF-8 check inline with the length calculation
418+
// instead of doing it afterwards.
415419
str::from_utf8(self.to_bytes())
416420
}
417421

@@ -426,7 +430,8 @@ impl CStr {
426430
/// > after a 0-cost cast, but it is planned to alter its definition in the
427431
/// > future to perform the length calculation in addition to the UTF-8
428432
/// > check whenever this method is called.
429-
#[unstable(feature = "cstr_to_str", reason = "recently added")]
433+
#[unstable(feature = "cstr_to_str", reason = "recently added",
434+
issue = "27764")]
430435
pub fn to_string_lossy(&self) -> Cow<str> {
431436
String::from_utf8_lossy(self.to_bytes())
432437
}

src/libstd/ffi/os_str.rs

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,6 @@
2929
//! for conversion to/from various other string types. Eventually these types
3030
//! will offer a full-fledged string API.
3131
32-
#![unstable(feature = "os_str",
33-
reason = "recently added as part of path/io reform")]
34-
3532
use borrow::{Borrow, Cow, ToOwned};
3633
use ffi::CString;
3734
use fmt::{self, Debug};
@@ -74,7 +71,7 @@ impl OsString {
7471
///
7572
/// On Windows system, only UTF-8 byte sequences will successfully
7673
/// convert; non UTF-8 data will produce `None`.
77-
#[unstable(feature = "convert", reason = "recently added")]
74+
#[unstable(feature = "convert", reason = "recently added", issue = "27704")]
7875
pub fn from_bytes<B>(bytes: B) -> Option<OsString> where B: Into<Vec<u8>> {
7976
#[cfg(unix)]
8077
fn from_bytes_inner(vec: Vec<u8>) -> Option<OsString> {
@@ -258,7 +255,7 @@ impl OsStr {
258255
/// On Windows systems, this returns `None` unless the `OsStr` is
259256
/// valid unicode, in which case it produces UTF-8-encoded
260257
/// data. This may entail checking validity.
261-
#[unstable(feature = "convert", reason = "recently added")]
258+
#[unstable(feature = "convert", reason = "recently added", issue = "27704")]
262259
pub fn to_bytes(&self) -> Option<&[u8]> {
263260
if cfg!(windows) {
264261
self.to_str().map(|s| s.as_bytes())
@@ -274,7 +271,7 @@ impl OsStr {
274271
/// This is a convenience for creating a `CString` from
275272
/// `self.to_bytes()`, and inherits the platform behavior of the
276273
/// `to_bytes` method.
277-
#[unstable(feature = "convert", reason = "recently added")]
274+
#[unstable(feature = "convert", reason = "recently added", issue = "27704")]
278275
pub fn to_cstring(&self) -> Option<CString> {
279276
self.to_bytes().and_then(|b| CString::new(b).ok())
280277
}

src/libstd/fs.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,8 @@ pub struct DirEntry(fs_imp::DirEntry);
8888
#[unstable(feature = "fs_walk",
8989
reason = "the precise semantics and defaults for a recursive walk \
9090
may change and this may end up accounting for files such \
91-
as symlinks differently")]
91+
as symlinks differently",
92+
issue = "27707")]
9293
pub struct WalkDir {
9394
cur: Option<ReadDir>,
9495
stack: Vec<io::Result<ReadDir>>,
@@ -154,7 +155,8 @@ pub struct FileType(fs_imp::FileType);
154155
/// A builder used to create directories in various manners.
155156
///
156157
/// This builder also supports platform-specific options.
157-
#[unstable(feature = "dir_builder", reason = "recently added API")]
158+
#[unstable(feature = "dir_builder", reason = "recently added API",
159+
issue = "27710")]
158160
pub struct DirBuilder {
159161
inner: fs_imp::DirBuilder,
160162
recursive: bool,
@@ -949,7 +951,8 @@ pub fn read_link<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
949951

950952
/// Returns the canonical form of a path with all intermediate components
951953
/// normalized and symbolic links resolved.
952-
#[unstable(feature = "fs_canonicalize", reason = "recently added API")]
954+
#[unstable(feature = "fs_canonicalize", reason = "recently added API",
955+
issue = "27706")]
953956
pub fn canonicalize<P: AsRef<Path>>(path: P) -> io::Result<PathBuf> {
954957
fs_imp::canonicalize(path.as_ref())
955958
}
@@ -1107,13 +1110,14 @@ pub fn read_dir<P: AsRef<Path>>(path: P) -> io::Result<ReadDir> {
11071110
#[unstable(feature = "fs_walk",
11081111
reason = "the precise semantics and defaults for a recursive walk \
11091112
may change and this may end up accounting for files such \
1110-
as symlinks differently")]
1113+
as symlinks differently",
1114+
issue = "27707")]
11111115
pub fn walk_dir<P: AsRef<Path>>(path: P) -> io::Result<WalkDir> {
11121116
let start = try!(read_dir(path));
11131117
Ok(WalkDir { cur: Some(start), stack: Vec::new() })
11141118
}
11151119

1116-
#[unstable(feature = "fs_walk")]
1120+
#[unstable(feature = "fs_walk", issue = "27707")]
11171121
impl Iterator for WalkDir {
11181122
type Item = io::Result<DirEntry>;
11191123

@@ -1146,7 +1150,8 @@ impl Iterator for WalkDir {
11461150
#[unstable(feature = "path_ext",
11471151
reason = "The precise set of methods exposed on this trait may \
11481152
change and some methods may be removed. For stable code, \
1149-
see the std::fs::metadata function.")]
1153+
see the std::fs::metadata function.",
1154+
issue = "27725")]
11501155
pub trait PathExt {
11511156
/// Gets information on the file, directory, etc at this path.
11521157
///
@@ -1242,7 +1247,8 @@ pub fn set_permissions<P: AsRef<Path>>(path: P, perm: Permissions)
12421247
fs_imp::set_perm(path.as_ref(), perm.0)
12431248
}
12441249

1245-
#[unstable(feature = "dir_builder", reason = "recently added API")]
1250+
#[unstable(feature = "dir_builder", reason = "recently added API",
1251+
issue = "27710")]
12461252
impl DirBuilder {
12471253
/// Creates a new set of options with default mode/security settings for all
12481254
/// platforms and also non-recursive.

src/libstd/io/error.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,8 @@ pub enum ErrorKind {
150150
/// Any I/O error not part of this list.
151151
#[unstable(feature = "io_error_internals",
152152
reason = "better expressed through extensible enums that this \
153-
enum cannot be exhaustively matched against")]
153+
enum cannot be exhaustively matched against",
154+
issue = "0")]
154155
#[doc(hidden)]
155156
__Nonexhaustive,
156157
}

0 commit comments

Comments
 (0)