diff --git a/src/libcore/num/dec2flt/mod.rs b/src/libcore/num/dec2flt/mod.rs index 413a67b2563..7c3c384ea93 100644 --- a/src/libcore/num/dec2flt/mod.rs +++ b/src/libcore/num/dec2flt/mod.rs @@ -92,7 +92,8 @@ #![doc(hidden)] #![unstable(feature = "dec2flt", - reason = "internal routines only exposed for testing")] + reason = "internal routines only exposed for testing", + issue = "0")] use prelude::v1::*; use num::ParseFloatError as PFE; diff --git a/src/libstd/ascii.rs b/src/libstd/ascii.rs index 82b5f60d65c..b6123264ea8 100644 --- a/src/libstd/ascii.rs +++ b/src/libstd/ascii.rs @@ -117,7 +117,7 @@ pub trait AsciiExt { /// /// assert_eq!('A', ascii); /// ``` - #[unstable(feature = "ascii")] + #[unstable(feature = "ascii", issue = "27809")] fn make_ascii_uppercase(&mut self); /// Converts this type to its ASCII lower case equivalent in-place. @@ -137,7 +137,7 @@ pub trait AsciiExt { /// /// assert_eq!('a', ascii); /// ``` - #[unstable(feature = "ascii")] + #[unstable(feature = "ascii", issue = "27809")] fn make_ascii_lowercase(&mut self); } diff --git a/src/libstd/collections/hash/map.rs b/src/libstd/collections/hash/map.rs index 654b2eac4ba..d5638bdac69 100644 --- a/src/libstd/collections/hash/map.rs +++ b/src/libstd/collections/hash/map.rs @@ -553,7 +553,8 @@ impl HashMap /// map.insert(1, 2); /// ``` #[inline] - #[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear")] + #[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear", + issue = "27713")] pub fn with_hash_state(hash_state: S) -> HashMap { HashMap { hash_state: hash_state, @@ -583,7 +584,8 @@ impl HashMap /// map.insert(1, 2); /// ``` #[inline] - #[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear")] + #[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear", + issue = "27713")] pub fn with_capacity_and_hash_state(capacity: usize, hash_state: S) -> HashMap { let resize_policy = DefaultResizePolicy::new(); @@ -998,7 +1000,8 @@ impl HashMap /// ``` #[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 { fn last_two((_, b, c): (A, B, C)) -> (B, C) { (b, c) } 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> { /// HashMap drain 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, K: 'a, V: 'a> { inner: iter::Map, fn((SafeHash, K, V)) -> (K, V)> } @@ -1587,14 +1591,16 @@ impl Extend<(K, V)> for HashMap /// instances are unlikely to produce the same result for the same values. #[derive(Clone)] #[unstable(feature = "hashmap_hasher", - reason = "hashing an hash maps may be altered")] + reason = "hashing an hash maps may be altered", + issue = "27713")] pub struct RandomState { k0: u64, k1: u64, } #[unstable(feature = "hashmap_hasher", - reason = "hashing an hash maps may be altered")] + reason = "hashing an hash maps may be altered", + issue = "27713")] impl RandomState { /// Constructs a new `RandomState` that is initialized with random keys. #[inline] @@ -1606,7 +1612,8 @@ impl RandomState { } #[unstable(feature = "hashmap_hasher", - reason = "hashing an hash maps may be altered")] + reason = "hashing an hash maps may be altered", + issue = "27713")] impl HashState for RandomState { type Hasher = SipHasher; #[inline] diff --git a/src/libstd/collections/hash/set.rs b/src/libstd/collections/hash/set.rs index fb594dadd73..ccad088a298 100644 --- a/src/libstd/collections/hash/set.rs +++ b/src/libstd/collections/hash/set.rs @@ -164,7 +164,8 @@ impl HashSet /// set.insert(2); /// ``` #[inline] - #[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear")] + #[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear", + issue = "27713")] pub fn with_hash_state(hash_state: S) -> HashSet { HashSet::with_capacity_and_hash_state(INITIAL_CAPACITY, hash_state) } @@ -190,7 +191,8 @@ impl HashSet /// set.insert(1); /// ``` #[inline] - #[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear")] + #[unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear", + issue = "27713")] pub fn with_capacity_and_hash_state(capacity: usize, hash_state: S) -> HashSet { HashSet { @@ -411,7 +413,8 @@ impl HashSet /// Clears the set, returning all elements in an iterator. #[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 { fn first((a, _): (A, B)) -> A { a } let first: fn((T, ())) -> T = first; // coerce to fn pointer diff --git a/src/libstd/collections/hash/state.rs b/src/libstd/collections/hash/state.rs index 546e15296c7..1790eeb00b7 100644 --- a/src/libstd/collections/hash/state.rs +++ b/src/libstd/collections/hash/state.rs @@ -8,7 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear")] +#![unstable(feature = "hashmap_hasher", reason = "hasher stuff is unclear", + issue = "27713")] use clone::Clone; use default::Default; diff --git a/src/libstd/collections/mod.rs b/src/libstd/collections/mod.rs index d59d08497d2..4367dda8466 100644 --- a/src/libstd/collections/mod.rs +++ b/src/libstd/collections/mod.rs @@ -410,7 +410,8 @@ pub mod hash_set { /// Experimental support for providing custom hash algorithms to a HashMap and /// HashSet. -#[unstable(feature = "hashmap_hasher", reason = "module was recently added")] +#[unstable(feature = "hashmap_hasher", reason = "module was recently added", + issue = "27713")] pub mod hash_state { pub use super::hash::state::*; } diff --git a/src/libstd/dynamic_lib.rs b/src/libstd/dynamic_lib.rs index 3621d18daed..43bfce9b9e9 100644 --- a/src/libstd/dynamic_lib.rs +++ b/src/libstd/dynamic_lib.rs @@ -14,7 +14,8 @@ #![unstable(feature = "dynamic_lib", reason = "API has not been scrutinized and is highly likely to \ - either disappear or change")] + either disappear or change", + issue = "27810")] #![allow(missing_docs)] use prelude::v1::*; diff --git a/src/libstd/error.rs b/src/libstd/error.rs index f0f481d3721..46d03169b2d 100644 --- a/src/libstd/error.rs +++ b/src/libstd/error.rs @@ -78,7 +78,8 @@ pub trait Error: Debug + Display + Reflect { /// Get the `TypeId` of `self` #[doc(hidden)] #[unstable(feature = "error_type_id", - reason = "unclear whether to commit to this public implementation detail")] + reason = "unclear whether to commit to this public implementation detail", + issue = "27745")] fn type_id(&self) -> TypeId where Self: 'static { TypeId::of::() } diff --git a/src/libstd/ffi/c_str.rs b/src/libstd/ffi/c_str.rs index f99d3c14ed8..b973dcef651 100644 --- a/src/libstd/ffi/c_str.rs +++ b/src/libstd/ffi/c_str.rs @@ -205,7 +205,8 @@ impl CString { /// The only appropriate argument is a pointer obtained by calling /// `into_ptr`. The length of the string will be recalculated /// using the pointer. - #[unstable(feature = "cstr_memory", reason = "recently added")] + #[unstable(feature = "cstr_memory", reason = "recently added", + issue = "27769")] // NB: may want to be called from_raw, needs to consider CStr::from_ptr, // Box::from_raw (or whatever it's currently called), and // slice::from_raw_parts @@ -223,7 +224,8 @@ impl CString { /// this string. /// /// Failure to call `from_ptr` will lead to a memory leak. - #[unstable(feature = "cstr_memory", reason = "recently added")] + #[unstable(feature = "cstr_memory", reason = "recently added", + issue = "27769")] // NB: may want to be called into_raw, see comments on from_ptr pub fn into_ptr(self) -> *const libc::c_char { // It is important that the bytes be sized to fit - we need @@ -407,11 +409,13 @@ impl CStr { /// > after a 0-cost cast, but it is planned to alter its definition in the /// > future to perform the length calculation in addition to the UTF-8 /// > check whenever this method is called. - #[unstable(feature = "cstr_to_str", reason = "recently added")] + #[unstable(feature = "cstr_to_str", reason = "recently added", + issue = "27764")] pub fn to_str(&self) -> Result<&str, str::Utf8Error> { - // NB: When CStr is changed to perform the length check in .to_bytes() instead of in - // from_ptr(), it may be worth considering if this should be rewritten to do the UTF-8 - // check inline with the length calculation instead of doing it afterwards. + // NB: When CStr is changed to perform the length check in .to_bytes() + // instead of in from_ptr(), it may be worth considering if this should + // be rewritten to do the UTF-8 check inline with the length calculation + // instead of doing it afterwards. str::from_utf8(self.to_bytes()) } @@ -426,7 +430,8 @@ impl CStr { /// > after a 0-cost cast, but it is planned to alter its definition in the /// > future to perform the length calculation in addition to the UTF-8 /// > check whenever this method is called. - #[unstable(feature = "cstr_to_str", reason = "recently added")] + #[unstable(feature = "cstr_to_str", reason = "recently added", + issue = "27764")] pub fn to_string_lossy(&self) -> Cow { String::from_utf8_lossy(self.to_bytes()) } diff --git a/src/libstd/ffi/os_str.rs b/src/libstd/ffi/os_str.rs index 8831830f799..751c76b9960 100644 --- a/src/libstd/ffi/os_str.rs +++ b/src/libstd/ffi/os_str.rs @@ -29,9 +29,6 @@ //! for conversion to/from various other string types. Eventually these types //! will offer a full-fledged string API. -#![unstable(feature = "os_str", - reason = "recently added as part of path/io reform")] - use borrow::{Borrow, Cow, ToOwned}; use ffi::CString; use fmt::{self, Debug}; @@ -74,7 +71,7 @@ impl OsString { /// /// On Windows system, only UTF-8 byte sequences will successfully /// convert; non UTF-8 data will produce `None`. - #[unstable(feature = "convert", reason = "recently added")] + #[unstable(feature = "convert", reason = "recently added", issue = "27704")] pub fn from_bytes(bytes: B) -> Option where B: Into> { #[cfg(unix)] fn from_bytes_inner(vec: Vec) -> Option { @@ -258,7 +255,7 @@ impl OsStr { /// On Windows systems, this returns `None` unless the `OsStr` is /// valid unicode, in which case it produces UTF-8-encoded /// data. This may entail checking validity. - #[unstable(feature = "convert", reason = "recently added")] + #[unstable(feature = "convert", reason = "recently added", issue = "27704")] pub fn to_bytes(&self) -> Option<&[u8]> { if cfg!(windows) { self.to_str().map(|s| s.as_bytes()) @@ -274,7 +271,7 @@ impl OsStr { /// This is a convenience for creating a `CString` from /// `self.to_bytes()`, and inherits the platform behavior of the /// `to_bytes` method. - #[unstable(feature = "convert", reason = "recently added")] + #[unstable(feature = "convert", reason = "recently added", issue = "27704")] pub fn to_cstring(&self) -> Option { self.to_bytes().and_then(|b| CString::new(b).ok()) } diff --git a/src/libstd/fs.rs b/src/libstd/fs.rs index 53caa0e78e2..0014391670a 100644 --- a/src/libstd/fs.rs +++ b/src/libstd/fs.rs @@ -88,7 +88,8 @@ pub struct DirEntry(fs_imp::DirEntry); #[unstable(feature = "fs_walk", reason = "the precise semantics and defaults for a recursive walk \ may change and this may end up accounting for files such \ - as symlinks differently")] + as symlinks differently", + issue = "27707")] pub struct WalkDir { cur: Option, stack: Vec>, @@ -154,7 +155,8 @@ pub struct FileType(fs_imp::FileType); /// A builder used to create directories in various manners. /// /// This builder also supports platform-specific options. -#[unstable(feature = "dir_builder", reason = "recently added API")] +#[unstable(feature = "dir_builder", reason = "recently added API", + issue = "27710")] pub struct DirBuilder { inner: fs_imp::DirBuilder, recursive: bool, @@ -949,7 +951,8 @@ pub fn read_link>(path: P) -> io::Result { /// Returns the canonical form of a path with all intermediate components /// normalized and symbolic links resolved. -#[unstable(feature = "fs_canonicalize", reason = "recently added API")] +#[unstable(feature = "fs_canonicalize", reason = "recently added API", + issue = "27706")] pub fn canonicalize>(path: P) -> io::Result { fs_imp::canonicalize(path.as_ref()) } @@ -1107,13 +1110,14 @@ pub fn read_dir>(path: P) -> io::Result { #[unstable(feature = "fs_walk", reason = "the precise semantics and defaults for a recursive walk \ may change and this may end up accounting for files such \ - as symlinks differently")] + as symlinks differently", + issue = "27707")] pub fn walk_dir>(path: P) -> io::Result { let start = try!(read_dir(path)); Ok(WalkDir { cur: Some(start), stack: Vec::new() }) } -#[unstable(feature = "fs_walk")] +#[unstable(feature = "fs_walk", issue = "27707")] impl Iterator for WalkDir { type Item = io::Result; @@ -1146,7 +1150,8 @@ impl Iterator for WalkDir { #[unstable(feature = "path_ext", reason = "The precise set of methods exposed on this trait may \ change and some methods may be removed. For stable code, \ - see the std::fs::metadata function.")] + see the std::fs::metadata function.", + issue = "27725")] pub trait PathExt { /// Gets information on the file, directory, etc at this path. /// @@ -1242,7 +1247,8 @@ pub fn set_permissions>(path: P, perm: Permissions) fs_imp::set_perm(path.as_ref(), perm.0) } -#[unstable(feature = "dir_builder", reason = "recently added API")] +#[unstable(feature = "dir_builder", reason = "recently added API", + issue = "27710")] impl DirBuilder { /// Creates a new set of options with default mode/security settings for all /// platforms and also non-recursive. diff --git a/src/libstd/io/error.rs b/src/libstd/io/error.rs index e12e202148b..17a72e0f1b5 100644 --- a/src/libstd/io/error.rs +++ b/src/libstd/io/error.rs @@ -150,7 +150,8 @@ pub enum ErrorKind { /// Any I/O error not part of this list. #[unstable(feature = "io_error_internals", reason = "better expressed through extensible enums that this \ - enum cannot be exhaustively matched against")] + enum cannot be exhaustively matched against", + issue = "0")] #[doc(hidden)] __Nonexhaustive, } diff --git a/src/libstd/io/mod.rs b/src/libstd/io/mod.rs index eda6e85ff7f..5ad5d0fa4d5 100644 --- a/src/libstd/io/mod.rs +++ b/src/libstd/io/mod.rs @@ -647,7 +647,8 @@ pub trait Read { /// ``` #[unstable(feature = "io", reason = "the semantics of a partial read/write \ of where errors happen is currently \ - unclear and may change")] + unclear and may change", + issue = "27802")] fn chars(self) -> Chars where Self: Sized { Chars { inner: self } } @@ -754,7 +755,8 @@ pub trait Read { /// ``` #[unstable(feature = "io", reason = "the semantics of a partial read/write \ of where errors happen is currently \ - unclear and may change")] + unclear and may change", + issue = "27802")] fn tee(self, out: W) -> Tee where Self: Sized { Tee { reader: self, writer: out } } @@ -1016,7 +1018,8 @@ pub trait Write { /// ``` #[unstable(feature = "io", reason = "the semantics of a partial read/write \ of where errors happen is currently \ - unclear and may change")] + unclear and may change", + issue = "27802")] fn broadcast(self, other: W) -> Broadcast where Self: Sized { @@ -1401,13 +1404,15 @@ pub trait BufRead: Read { /// writer. Please see the documentation of `broadcast()` for more details. /// /// [broadcast]: trait.Write.html#method.broadcast -#[unstable(feature = "io", reason = "awaiting stability of Write::broadcast")] +#[unstable(feature = "io", reason = "awaiting stability of Write::broadcast", + issue = "27802")] pub struct Broadcast { first: T, second: U, } -#[unstable(feature = "io", reason = "awaiting stability of Write::broadcast")] +#[unstable(feature = "io", reason = "awaiting stability of Write::broadcast", + issue = "27802")] impl Write for Broadcast { fn write(&mut self, data: &[u8]) -> Result { let n = try!(self.first.write(data)); @@ -1509,13 +1514,15 @@ impl BufRead for Take { /// Please see the documentation of `tee()` for more details. /// /// [tee]: trait.Read.html#method.tee -#[unstable(feature = "io", reason = "awaiting stability of Read::tee")] +#[unstable(feature = "io", reason = "awaiting stability of Read::tee", + issue = "27802")] pub struct Tee { reader: R, writer: W, } -#[unstable(feature = "io", reason = "awaiting stability of Read::tee")] +#[unstable(feature = "io", reason = "awaiting stability of Read::tee", + issue = "27802")] impl Read for Tee { fn read(&mut self, buf: &mut [u8]) -> Result { let n = try!(self.reader.read(buf)); @@ -1556,7 +1563,8 @@ impl Iterator for Bytes { /// Please see the documentation of `chars()` for more details. /// /// [chars]: trait.Read.html#method.chars -#[unstable(feature = "io", reason = "awaiting stability of Read::chars")] +#[unstable(feature = "io", reason = "awaiting stability of Read::chars", + issue = "27802")] pub struct Chars { inner: R, } @@ -1564,7 +1572,8 @@ pub struct Chars { /// An enumeration of possible errors that can be generated from the `Chars` /// adapter. #[derive(Debug)] -#[unstable(feature = "io", reason = "awaiting stability of Read::chars")] +#[unstable(feature = "io", reason = "awaiting stability of Read::chars", + issue = "27802")] pub enum CharsError { /// Variant representing that the underlying stream was read successfully /// but it did not contain valid utf8 data. @@ -1574,7 +1583,8 @@ pub enum CharsError { Other(Error), } -#[unstable(feature = "io", reason = "awaiting stability of Read::chars")] +#[unstable(feature = "io", reason = "awaiting stability of Read::chars", + issue = "27802")] impl Iterator for Chars { type Item = result::Result; @@ -1606,7 +1616,8 @@ impl Iterator for Chars { } } -#[unstable(feature = "io", reason = "awaiting stability of Read::chars")] +#[unstable(feature = "io", reason = "awaiting stability of Read::chars", + issue = "27802")] impl std_error::Error for CharsError { fn description(&self) -> &str { match *self { @@ -1622,7 +1633,8 @@ impl std_error::Error for CharsError { } } -#[unstable(feature = "io", reason = "awaiting stability of Read::chars")] +#[unstable(feature = "io", reason = "awaiting stability of Read::chars", + issue = "27802")] impl fmt::Display for CharsError { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { match *self { diff --git a/src/libstd/io/stdio.rs b/src/libstd/io/stdio.rs index 33c561e3eea..e60bdcf0ec6 100644 --- a/src/libstd/io/stdio.rs +++ b/src/libstd/io/stdio.rs @@ -531,7 +531,8 @@ impl<'a> Write for StderrLock<'a> { /// output handle is to the process's stderr stream. #[unstable(feature = "set_stdio", reason = "this function may disappear completely or be replaced \ - with a more general mechanism")] + with a more general mechanism", + issue = "0")] #[doc(hidden)] pub fn set_panic(sink: Box) -> Option> { use panicking::LOCAL_STDERR; @@ -554,7 +555,8 @@ pub fn set_panic(sink: Box) -> Option> { /// output handle is to the process's stdout stream. #[unstable(feature = "set_stdio", reason = "this function may disappear completely or be replaced \ - with a more general mechanism")] + with a more general mechanism", + issue = "0")] #[doc(hidden)] pub fn set_print(sink: Box) -> Option> { use mem; @@ -567,7 +569,8 @@ pub fn set_print(sink: Box) -> Option> { } #[unstable(feature = "print", - reason = "implementation detail which may disappear or be replaced at any time")] + reason = "implementation detail which may disappear or be replaced at any time", + issue = "0")] #[doc(hidden)] pub fn _print(args: fmt::Arguments) { let result = LOCAL_STDOUT.with(|s| { diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs index 3dcb157233d..655fa04c264 100644 --- a/src/libstd/lib.rs +++ b/src/libstd/lib.rs @@ -398,7 +398,7 @@ mod rand; // but it may be stabilized long-term. As a result we're exposing a hidden, // unstable module so we can get our build working. #[doc(hidden)] -#[unstable(feature = "rand")] +#[unstable(feature = "rand", issue = "0")] pub mod __rand { pub use rand::{thread_rng, ThreadRng, Rng}; } diff --git a/src/libstd/net/addr.rs b/src/libstd/net/addr.rs index b0bf9d0f806..cf0ede30dcc 100644 --- a/src/libstd/net/addr.rs +++ b/src/libstd/net/addr.rs @@ -48,7 +48,7 @@ pub struct SocketAddrV6 { inner: libc::sockaddr_in6 } impl SocketAddr { /// Creates a new socket address from the (ip, port) pair. - #[unstable(feature = "ip_addr", reason = "recent addition")] + #[unstable(feature = "ip_addr", reason = "recent addition", issue = "27801")] pub fn new(ip: IpAddr, port: u16) -> SocketAddr { match ip { IpAddr::V4(a) => SocketAddr::V4(SocketAddrV4::new(a, port)), @@ -57,7 +57,7 @@ impl SocketAddr { } /// Returns the IP address associated with this socket address. - #[unstable(feature = "ip_addr", reason = "recent addition")] + #[unstable(feature = "ip_addr", reason = "recent addition", issue = "27801")] pub fn ip(&self) -> IpAddr { match *self { SocketAddr::V4(ref a) => IpAddr::V4(*a.ip()), diff --git a/src/libstd/net/ip.rs b/src/libstd/net/ip.rs index 61abadd88f1..09aea50cfbe 100644 --- a/src/libstd/net/ip.rs +++ b/src/libstd/net/ip.rs @@ -10,7 +10,8 @@ #![unstable(feature = "ip", reason = "extra functionality has not been \ scrutinized to the level that it should \ - be stable")] + be stable", + issue = "27709")] use prelude::v1::*; @@ -22,7 +23,7 @@ use sys_common::{AsInner, FromInner}; use net::{hton, ntoh}; /// An IP address, either a IPv4 or IPv6 address. -#[unstable(feature = "ip_addr", reason = "recent addition")] +#[unstable(feature = "ip_addr", reason = "recent addition", issue = "27801")] #[derive(Copy, Clone, Eq, PartialEq, Debug, Hash, PartialOrd, Ord)] pub enum IpAddr { /// Representation of an IPv4 address. diff --git a/src/libstd/net/mod.rs b/src/libstd/net/mod.rs index c7daf5cdee5..8a02d37c89b 100644 --- a/src/libstd/net/mod.rs +++ b/src/libstd/net/mod.rs @@ -84,12 +84,14 @@ fn each_addr(addr: A, mut f: F) -> io::Result /// An iterator over `SocketAddr` values returned from a host lookup operation. #[unstable(feature = "lookup_host", reason = "unsure about the returned \ iterator and returning socket \ - addresses")] + addresses", + issue = "27705")] pub struct LookupHost(net_imp::LookupHost); #[unstable(feature = "lookup_host", reason = "unsure about the returned \ iterator and returning socket \ - addresses")] + addresses", + issue = "27705")] impl Iterator for LookupHost { type Item = io::Result; fn next(&mut self) -> Option> { self.0.next() } @@ -116,7 +118,8 @@ impl Iterator for LookupHost { /// ``` #[unstable(feature = "lookup_host", reason = "unsure about the returned \ iterator and returning socket \ - addresses")] + addresses", + issue = "27705")] pub fn lookup_host(host: &str) -> io::Result { net_imp::lookup_host(host).map(LookupHost) } @@ -126,7 +129,8 @@ pub fn lookup_host(host: &str) -> io::Result { /// This function may perform a DNS query to resolve `addr` and may also inspect /// system configuration to resolve the specified address. If the address /// cannot be resolved, it is returned in string format. -#[unstable(feature = "lookup_addr", reason = "recent addition")] +#[unstable(feature = "lookup_addr", reason = "recent addition", + issue = "27705")] pub fn lookup_addr(addr: &IpAddr) -> io::Result { net_imp::lookup_addr(addr) } diff --git a/src/libstd/net/tcp.rs b/src/libstd/net/tcp.rs index be224c15ff0..5467a8575ff 100644 --- a/src/libstd/net/tcp.rs +++ b/src/libstd/net/tcp.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![unstable(feature = "tcp", reason = "remaining functions have not been \ - scrutinized enough to be stabilized")] - use prelude::v1::*; use io::prelude::*; @@ -133,7 +130,8 @@ impl TcpStream { /// If the value specified is `None`, then `read` calls will block /// indefinitely. It is an error to pass the zero `Duration` to this /// method. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added")] + #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", + issue = "27773")] pub fn set_read_timeout(&self, dur: Option) -> io::Result<()> { self.0.set_read_timeout(dur) } @@ -143,7 +141,8 @@ impl TcpStream { /// If the value specified is `None`, then `write` calls will block /// indefinitely. It is an error to pass the zero `Duration` to this /// method. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added")] + #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", + issue = "27773")] pub fn set_write_timeout(&self, dur: Option) -> io::Result<()> { self.0.set_write_timeout(dur) } @@ -155,7 +154,8 @@ impl TcpStream { /// # Note /// /// Some platforms do not provide access to the current timeout. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added")] + #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", + issue = "27773")] pub fn read_timeout(&self) -> io::Result> { self.0.read_timeout() } @@ -167,7 +167,8 @@ impl TcpStream { /// # Note /// /// Some platforms do not provide access to the current timeout. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added")] + #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", + issue = "27773")] pub fn write_timeout(&self) -> io::Result> { self.0.write_timeout() } diff --git a/src/libstd/net/udp.rs b/src/libstd/net/udp.rs index 20ce344be4f..dcb76161d1f 100644 --- a/src/libstd/net/udp.rs +++ b/src/libstd/net/udp.rs @@ -8,9 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -#![unstable(feature = "udp", reason = "remaining functions have not been \ - scrutinized enough to be stabilized")] - use fmt; use io::{self, Error, ErrorKind}; use net::{ToSocketAddrs, SocketAddr}; @@ -100,7 +97,8 @@ impl UdpSocket { /// If the value specified is `None`, then `read` calls will block /// indefinitely. It is an error to pass the zero `Duration` to this /// method. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added")] + #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", + issue = "27773")] pub fn set_read_timeout(&self, dur: Option) -> io::Result<()> { self.0.set_read_timeout(dur) } @@ -110,7 +108,8 @@ impl UdpSocket { /// If the value specified is `None`, then `write` calls will block /// indefinitely. It is an error to pass the zero `Duration` to this /// method. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added")] + #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", + issue = "27773")] pub fn set_write_timeout(&self, dur: Option) -> io::Result<()> { self.0.set_write_timeout(dur) } @@ -118,7 +117,8 @@ impl UdpSocket { /// Returns the read timeout of this socket. /// /// If the timeout is `None`, then `read` calls will block indefinitely. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added")] + #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", + issue = "27773")] pub fn read_timeout(&self) -> io::Result> { self.0.read_timeout() } @@ -126,7 +126,8 @@ impl UdpSocket { /// Returns the write timeout of this socket. /// /// If the timeout is `None`, then `write` calls will block indefinitely. - #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added")] + #[unstable(feature = "socket_timeout", reason = "RFC 1047 - recently added", + issue = "27773")] pub fn write_timeout(&self) -> io::Result> { self.0.write_timeout() } diff --git a/src/libstd/num/f32.rs b/src/libstd/num/f32.rs index 2bc837a231c..bcbd1a80e8b 100644 --- a/src/libstd/num/f32.rs +++ b/src/libstd/num/f32.rs @@ -124,7 +124,8 @@ mod cmath { #[stable(feature = "rust1", since = "1.0.0")] impl f32 { /// Parses a float as with a given radix - #[unstable(feature = "float_from_str_radix", reason = "recently moved API")] + #[unstable(feature = "float_from_str_radix", reason = "recently moved API", + issue = "27736")] pub fn from_str_radix(s: &str, radix: u32) -> Result { num::Float::from_str_radix(s, radix) } @@ -251,7 +252,8 @@ impl f32 { /// assert!(abs_difference <= f32::EPSILON); /// ``` /// [floating-point]: ../../../../../reference.html#machine-types - #[unstable(feature = "float_extras", reason = "signature is undecided")] + #[unstable(feature = "float_extras", reason = "signature is undecided", + issue = "27752")] #[inline] pub fn integer_decode(self) -> (u64, i16, i8) { num::Float::integer_decode(self) @@ -607,7 +609,8 @@ impl f32 { /// /// assert!(abs_difference <= f32::EPSILON); /// ``` - #[unstable(feature = "float_extras", reason = "desirability is unclear")] + #[unstable(feature = "float_extras", reason = "desirability is unclear", + issue = "27752")] #[inline] pub fn to_degrees(self) -> f32 { num::Float::to_degrees(self) } @@ -624,7 +627,8 @@ impl f32 { /// /// assert!(abs_difference <= f32::EPSILON); /// ``` - #[unstable(feature = "float_extras", reason = "desirability is unclear")] + #[unstable(feature = "float_extras", reason = "desirability is unclear", + issue = "27752")] #[inline] pub fn to_radians(self) -> f32 { num::Float::to_radians(self) } @@ -640,7 +644,8 @@ impl f32 { /// assert!(abs_difference <= f32::EPSILON); /// ``` #[unstable(feature = "float_extras", - reason = "pending integer conventions")] + reason = "pending integer conventions", + issue = "27752")] #[inline] pub fn ldexp(x: f32, exp: isize) -> f32 { unsafe { cmath::ldexpf(x, exp as c_int) } @@ -668,7 +673,8 @@ impl f32 { /// assert!(abs_difference_1 <= f32::EPSILON); /// ``` #[unstable(feature = "float_extras", - reason = "pending integer conventions")] + reason = "pending integer conventions", + issue = "27752")] #[inline] pub fn frexp(self) -> (f32, isize) { unsafe { @@ -693,7 +699,8 @@ impl f32 { /// assert!(abs_diff <= f32::EPSILON); /// ``` #[unstable(feature = "float_extras", - reason = "unsure about its place in the world")] + reason = "unsure about its place in the world", + issue = "27752")] #[inline] pub fn next_after(self, other: f32) -> f32 { unsafe { cmath::nextafterf(self, other) } diff --git a/src/libstd/num/f64.rs b/src/libstd/num/f64.rs index c6e2d7380df..ea48c46b611 100644 --- a/src/libstd/num/f64.rs +++ b/src/libstd/num/f64.rs @@ -80,7 +80,8 @@ mod cmath { #[stable(feature = "rust1", since = "1.0.0")] impl f64 { /// Parses a float as with a given radix - #[unstable(feature = "float_from_str_radix", reason = "recently moved API")] + #[unstable(feature = "float_from_str_radix", reason = "recently moved API", + issue = "27736")] pub fn from_str_radix(s: &str, radix: u32) -> Result { num::Float::from_str_radix(s, radix) } @@ -205,7 +206,8 @@ impl f64 { /// assert!(abs_difference < 1e-10); /// ``` /// [floating-point]: ../../../../../reference.html#machine-types - #[unstable(feature = "float_extras", reason = "signature is undecided")] + #[unstable(feature = "float_extras", reason = "signature is undecided", + issue = "27752")] #[inline] pub fn integer_decode(self) -> (u64, i16, i8) { num::Float::integer_decode(self) } @@ -575,7 +577,8 @@ impl f64 { /// assert!(abs_difference < 1e-10); /// ``` #[unstable(feature = "float_extras", - reason = "pending integer conventions")] + reason = "pending integer conventions", + issue = "27752")] #[inline] pub fn ldexp(x: f64, exp: isize) -> f64 { unsafe { cmath::ldexp(x, exp as c_int) } @@ -601,7 +604,8 @@ impl f64 { /// assert!(abs_difference_1 < 1e-10); /// ``` #[unstable(feature = "float_extras", - reason = "pending integer conventions")] + reason = "pending integer conventions", + issue = "27752")] #[inline] pub fn frexp(self) -> (f64, isize) { unsafe { @@ -624,7 +628,8 @@ impl f64 { /// assert!(abs_diff < 1e-10); /// ``` #[unstable(feature = "float_extras", - reason = "unsure about its place in the world")] + reason = "unsure about its place in the world", + issue = "27752")] #[inline] pub fn next_after(self, other: f64) -> f64 { unsafe { cmath::nextafter(self, other) } diff --git a/src/libstd/os/raw.rs b/src/libstd/os/raw.rs index 2de0448a534..db487d041b7 100644 --- a/src/libstd/os/raw.rs +++ b/src/libstd/os/raw.rs @@ -49,9 +49,11 @@ #[repr(u8)] #[stable(feature = "raw_os", since = "1.1.0")] pub enum c_void { - #[unstable(feature = "c_void_variant", reason = "should not have to exist")] + #[unstable(feature = "c_void_variant", reason = "should not have to exist", + issue = "0")] #[doc(hidden)] __variant1, - #[unstable(feature = "c_void_variant", reason = "should not have to exist")] + #[unstable(feature = "c_void_variant", reason = "should not have to exist", + issue = "0")] #[doc(hidden)] __variant2, } diff --git a/src/libstd/path.rs b/src/libstd/path.rs index 489438973b3..71aed040871 100644 --- a/src/libstd/path.rs +++ b/src/libstd/path.rs @@ -725,7 +725,7 @@ impl<'a> Components<'a> { } /// Examine the next component without consuming it. - #[unstable(feature = "path_components_peek")] + #[unstable(feature = "path_components_peek", issue = "27727")] pub fn peek(&self) -> Option> { self.clone().next() } @@ -1358,7 +1358,9 @@ impl Path { /// Prefixes are relevant only for Windows paths, and consist of volumes /// like `C:`, UNC prefixes like `\\server`, and others described in more /// detail in `std::os::windows::PathExt`. - #[unstable(feature = "path_prefix", reason = "uncertain whether to expose this convenience")] + #[unstable(feature = "path_prefix", + reason = "uncertain whether to expose this convenience", + issue = "27722")] pub fn prefix(&self) -> Option { self.components().prefix } @@ -1441,7 +1443,8 @@ impl Path { /// /// If `base` is not a prefix of `self` (i.e. `starts_with` /// returns false), then `relative_from` returns `None`. - #[unstable(feature = "path_relative_from", reason = "see #23284")] + #[unstable(feature = "path_relative_from", reason = "see #23284", + issue = "23284")] pub fn relative_from<'a, P: ?Sized + AsRef>(&'a self, base: &'a P) -> Option<&Path> { iter_after(self.components(), base.as_ref().components()).map(|c| c.as_path()) diff --git a/src/libstd/rand/mod.rs b/src/libstd/rand/mod.rs index ee46ec5c9c4..7a4a0f96b30 100644 --- a/src/libstd/rand/mod.rs +++ b/src/libstd/rand/mod.rs @@ -55,7 +55,7 @@ //! between the two sources. (Also note that, on some systems e.g. FreeBSD, both `/dev/random` //! and `/dev/urandom` may block once if the CSPRNG has not seeded yet.) -#![unstable(feature = "rand")] +#![unstable(feature = "rand", issue = "0")] use cell::RefCell; use io; diff --git a/src/libstd/rt/mod.rs b/src/libstd/rt/mod.rs index 2ace6e4cf8d..5464e7f9d89 100644 --- a/src/libstd/rt/mod.rs +++ b/src/libstd/rt/mod.rs @@ -18,7 +18,8 @@ #![unstable(feature = "rt", reason = "this public module should not exist and is highly likely \ - to disappear")] + to disappear", + issue = "0")] #![allow(missing_docs)] use prelude::v1::*; diff --git a/src/libstd/sync/condvar.rs b/src/libstd/sync/condvar.rs index 79b3dfa67b1..fc0e08139f4 100644 --- a/src/libstd/sync/condvar.rs +++ b/src/libstd/sync/condvar.rs @@ -76,7 +76,8 @@ pub struct Condvar { inner: Box } /// static CVAR: StaticCondvar = CONDVAR_INIT; /// ``` #[unstable(feature = "static_condvar", - reason = "may be merged with Condvar in the future")] + reason = "may be merged with Condvar in the future", + issue = "27717")] pub struct StaticCondvar { inner: sys::Condvar, mutex: AtomicUsize, @@ -84,7 +85,8 @@ pub struct StaticCondvar { /// Constant initializer for a statically allocated condition variable. #[unstable(feature = "static_condvar", - reason = "may be merged with Condvar in the future")] + reason = "may be merged with Condvar in the future", + issue = "27717")] pub const CONDVAR_INIT: StaticCondvar = StaticCondvar::new(); impl Condvar { @@ -173,7 +175,8 @@ impl Condvar { /// /// Like `wait`, the lock specified will be re-acquired when this function /// returns, regardless of whether the timeout elapsed or not. - #[unstable(feature = "wait_timeout", reason = "waiting for Duration")] + #[unstable(feature = "wait_timeout", reason = "waiting for Duration", + issue = "27772")] pub fn wait_timeout<'a, T>(&self, guard: MutexGuard<'a, T>, dur: Duration) -> LockResult<(MutexGuard<'a, T>, bool)> { @@ -190,7 +193,8 @@ impl Condvar { /// that the implementation will repeatedly wait while the duration has not /// passed and the provided function returns `false`. #[unstable(feature = "wait_timeout_with", - reason = "unsure if this API is broadly needed or what form it should take")] + reason = "unsure if this API is broadly needed or what form it should take", + issue = "27748")] pub fn wait_timeout_with<'a, T, F>(&self, guard: MutexGuard<'a, T>, dur: Duration, @@ -234,7 +238,8 @@ impl Drop for Condvar { impl StaticCondvar { /// Creates a new condition variable #[unstable(feature = "static_condvar", - reason = "may be merged with Condvar in the future")] + reason = "may be merged with Condvar in the future", + issue = "27717")] pub const fn new() -> StaticCondvar { StaticCondvar { inner: sys::Condvar::new(), @@ -247,7 +252,8 @@ impl StaticCondvar { /// /// See `Condvar::wait`. #[unstable(feature = "static_condvar", - reason = "may be merged with Condvar in the future")] + reason = "may be merged with Condvar in the future", + issue = "27717")] pub fn wait<'a, T>(&'static self, guard: MutexGuard<'a, T>) -> LockResult> { let poisoned = unsafe { @@ -268,7 +274,8 @@ impl StaticCondvar { /// /// See `Condvar::wait_timeout`. #[unstable(feature = "static_condvar", - reason = "may be merged with Condvar in the future")] + reason = "may be merged with Condvar in the future", + issue = "27717")] pub fn wait_timeout_ms<'a, T>(&'static self, guard: MutexGuard<'a, T>, ms: u32) -> LockResult<(MutexGuard<'a, T>, bool)> { self.wait_timeout(guard, Duration::from_millis(ms as u64)) @@ -279,7 +286,8 @@ impl StaticCondvar { /// /// See `Condvar::wait_timeout`. #[unstable(feature = "static_condvar", - reason = "may be merged with Condvar in the future")] + reason = "may be merged with Condvar in the future", + issue = "27717")] pub fn wait_timeout<'a, T>(&'static self, guard: MutexGuard<'a, T>, timeout: Duration) @@ -305,7 +313,8 @@ impl StaticCondvar { /// /// See `Condvar::wait_timeout_with`. #[unstable(feature = "static_condvar", - reason = "may be merged with Condvar in the future")] + reason = "may be merged with Condvar in the future", + issue = "27717")] pub fn wait_timeout_with<'a, T, F>(&'static self, guard: MutexGuard<'a, T>, dur: Duration, @@ -351,14 +360,16 @@ impl StaticCondvar { /// /// See `Condvar::notify_one`. #[unstable(feature = "static_condvar", - reason = "may be merged with Condvar in the future")] + reason = "may be merged with Condvar in the future", + issue = "27717")] pub fn notify_one(&'static self) { unsafe { self.inner.notify_one() } } /// Wakes up all blocked threads on this condvar. /// /// See `Condvar::notify_all`. #[unstable(feature = "static_condvar", - reason = "may be merged with Condvar in the future")] + reason = "may be merged with Condvar in the future", + issue = "27717")] pub fn notify_all(&'static self) { unsafe { self.inner.notify_all() } } /// Deallocates all resources associated with this static condvar. @@ -368,7 +379,8 @@ impl StaticCondvar { /// users of the condvar. This method is required to be called to not leak /// memory on all platforms. #[unstable(feature = "static_condvar", - reason = "may be merged with Condvar in the future")] + reason = "may be merged with Condvar in the future", + issue = "27717")] pub unsafe fn destroy(&'static self) { self.inner.destroy() } diff --git a/src/libstd/sync/mpsc/select.rs b/src/libstd/sync/mpsc/select.rs index 56d903fed3b..cc068fd1dea 100644 --- a/src/libstd/sync/mpsc/select.rs +++ b/src/libstd/sync/mpsc/select.rs @@ -54,7 +54,8 @@ module will likely be replaced, and it is currently \ unknown how much API breakage that will cause. The ability \ to select over a number of channels will remain forever, \ - but no guarantees beyond this are being made")] + but no guarantees beyond this are being made", + issue = "27800")] use core::cell::{Cell, UnsafeCell}; diff --git a/src/libstd/sync/mutex.rs b/src/libstd/sync/mutex.rs index 773bd7f5606..e56e5a72c13 100644 --- a/src/libstd/sync/mutex.rs +++ b/src/libstd/sync/mutex.rs @@ -151,7 +151,8 @@ unsafe impl Sync for Mutex { } /// // lock is unlocked here. /// ``` #[unstable(feature = "static_mutex", - reason = "may be merged with Mutex in the future")] + reason = "may be merged with Mutex in the future", + issue = "27717")] pub struct StaticMutex { lock: sys::Mutex, poison: poison::Flag, @@ -177,7 +178,8 @@ impl<'a, T: ?Sized> !marker::Send for MutexGuard<'a, T> {} /// Static initialization of a mutex. This constant can be used to initialize /// other mutex constants. #[unstable(feature = "static_mutex", - reason = "may be merged with Mutex in the future")] + reason = "may be merged with Mutex in the future", + issue = "27717")] pub const MUTEX_INIT: StaticMutex = StaticMutex::new(); impl Mutex { @@ -271,7 +273,8 @@ unsafe impl Sync for Dummy {} static DUMMY: Dummy = Dummy(UnsafeCell::new(())); #[unstable(feature = "static_mutex", - reason = "may be merged with Mutex in the future")] + reason = "may be merged with Mutex in the future", + issue = "27717")] impl StaticMutex { /// Creates a new mutex in an unlocked state ready for use. pub const fn new() -> StaticMutex { diff --git a/src/libstd/sync/rwlock.rs b/src/libstd/sync/rwlock.rs index 40d5af49156..7210328fad8 100644 --- a/src/libstd/sync/rwlock.rs +++ b/src/libstd/sync/rwlock.rs @@ -98,7 +98,8 @@ unsafe impl Sync for RwLock {} /// unsafe { LOCK.destroy() } // free all resources /// ``` #[unstable(feature = "static_rwlock", - reason = "may be merged with RwLock in the future")] + reason = "may be merged with RwLock in the future", + issue = "27717")] pub struct StaticRwLock { lock: sys::RWLock, poison: poison::Flag, @@ -106,7 +107,8 @@ pub struct StaticRwLock { /// Constant initialization for a statically-initialized rwlock. #[unstable(feature = "static_rwlock", - reason = "may be merged with RwLock in the future")] + reason = "may be merged with RwLock in the future", + issue = "27717")] pub const RW_LOCK_INIT: StaticRwLock = StaticRwLock::new(); /// RAII structure used to release the shared read access of a lock when @@ -285,7 +287,8 @@ unsafe impl Sync for Dummy {} static DUMMY: Dummy = Dummy(UnsafeCell::new(())); #[unstable(feature = "static_rwlock", - reason = "may be merged with RwLock in the future")] + reason = "may be merged with RwLock in the future", + issue = "27717")] impl StaticRwLock { /// Creates a new rwlock. pub const fn new() -> StaticRwLock { diff --git a/src/libstd/sync/semaphore.rs b/src/libstd/sync/semaphore.rs index 907df69bfb0..891f8775ff2 100644 --- a/src/libstd/sync/semaphore.rs +++ b/src/libstd/sync/semaphore.rs @@ -10,7 +10,8 @@ #![unstable(feature = "semaphore", reason = "the interaction between semaphores and the acquisition/release \ - of resources is currently unclear")] + of resources is currently unclear", + issue = "27798")] use ops::Drop; use sync::{Mutex, Condvar}; diff --git a/src/libstd/sys/common/remutex.rs b/src/libstd/sys/common/remutex.rs index 1676fe8220a..4df3441f87b 100644 --- a/src/libstd/sys/common/remutex.rs +++ b/src/libstd/sys/common/remutex.rs @@ -7,7 +7,9 @@ // , at your // option. This file may not be copied, modified, or distributed // except according to those terms. -#![unstable(feature = "reentrant_mutex", reason = "new API")] + +#![unstable(feature = "reentrant_mutex", reason = "new API", + issue = "27738")] use prelude::v1::*; diff --git a/src/libstd/sys/common/thread_local.rs b/src/libstd/sys/common/thread_local.rs index f68c57c86ef..56885cdd56d 100644 --- a/src/libstd/sys/common/thread_local.rs +++ b/src/libstd/sys/common/thread_local.rs @@ -55,7 +55,7 @@ //! ``` #![allow(non_camel_case_types)] -#![unstable(feature = "thread_local_internals")] +#![unstable(feature = "thread_local_internals", issue = "0")] #![allow(dead_code)] // sys isn't exported yet use sync::atomic::{self, AtomicUsize, Ordering}; diff --git a/src/libstd/sys/unix/ext/fs.rs b/src/libstd/sys/unix/ext/fs.rs index 9bcd62dbdd1..46ab83199f0 100644 --- a/src/libstd/sys/unix/ext/fs.rs +++ b/src/libstd/sys/unix/ext/fs.rs @@ -22,43 +22,43 @@ use sys::fs::MetadataExt as UnixMetadataExt; use sys; use sys_common::{FromInner, AsInner, AsInnerMut}; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const USER_READ: raw::mode_t = 0o400; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const USER_WRITE: raw::mode_t = 0o200; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const USER_EXECUTE: raw::mode_t = 0o100; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const USER_RWX: raw::mode_t = 0o700; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const GROUP_READ: raw::mode_t = 0o040; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const GROUP_WRITE: raw::mode_t = 0o020; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const GROUP_EXECUTE: raw::mode_t = 0o010; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const GROUP_RWX: raw::mode_t = 0o070; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const OTHER_READ: raw::mode_t = 0o004; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const OTHER_WRITE: raw::mode_t = 0o002; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const OTHER_EXECUTE: raw::mode_t = 0o001; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const OTHER_RWX: raw::mode_t = 0o007; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const ALL_READ: raw::mode_t = 0o444; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const ALL_WRITE: raw::mode_t = 0o222; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const ALL_EXECUTE: raw::mode_t = 0o111; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const ALL_RWX: raw::mode_t = 0o777; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const SETUID: raw::mode_t = 0o4000; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const SETGID: raw::mode_t = 0o2000; -#[unstable(feature = "fs_mode", reason = "recently added API")] +#[unstable(feature = "fs_mode", reason = "recently added API", issue = "27712")] pub const STICKY_BIT: raw::mode_t = 0o1000; /// Unix-specific extensions to `Permissions` @@ -178,7 +178,8 @@ impl MetadataExt for fs::Metadata { } /// Add special unix types (block/char device, fifo and socket) -#[unstable(feature = "file_type_ext", reason = "recently added API")] +#[unstable(feature = "file_type_ext", reason = "recently added API", + issue = "27796")] pub trait FileTypeExt { /// Returns whether this file type is a block device. fn is_block_device(&self) -> bool; @@ -190,7 +191,8 @@ pub trait FileTypeExt { fn is_socket(&self) -> bool; } -#[unstable(feature = "file_type_ext", reason = "recently added API")] +#[unstable(feature = "file_type_ext", reason = "recently added API", + issue = "27796")] impl FileTypeExt for fs::FileType { fn is_block_device(&self) -> bool { self.as_inner().is(libc::S_IFBLK) } fn is_char_device(&self) -> bool { self.as_inner().is(libc::S_IFCHR) } @@ -240,7 +242,8 @@ pub fn symlink, Q: AsRef>(src: P, dst: Q) -> io::Result<()> sys::fs::symlink(src.as_ref(), dst.as_ref()) } -#[unstable(feature = "dir_builder", reason = "recently added API")] +#[unstable(feature = "dir_builder", reason = "recently added API", + issue = "27710")] /// An extension trait for `fs::DirBuilder` for unix-specific options. pub trait DirBuilderExt { /// Sets the mode to create new directories with. This option defaults to diff --git a/src/libstd/sys/unix/ext/io.rs b/src/libstd/sys/unix/ext/io.rs index 580d2dbcf74..f4184f6a5d5 100644 --- a/src/libstd/sys/unix/ext/io.rs +++ b/src/libstd/sys/unix/ext/io.rs @@ -61,7 +61,8 @@ pub trait FromRawFd { /// A trait to express the ability to consume an object and acquire ownership of /// its raw file descriptor. -#[unstable(feature = "into_raw_os", reason = "recently added API")] +#[unstable(feature = "into_raw_os", reason = "recently added API", + issue = "27797")] pub trait IntoRawFd { /// Consumes this object, returning the raw underlying file descriptor. /// diff --git a/src/libstd/sys/unix/ext/process.rs b/src/libstd/sys/unix/ext/process.rs index 4ff6daf84c1..81980ea25fb 100644 --- a/src/libstd/sys/unix/ext/process.rs +++ b/src/libstd/sys/unix/ext/process.rs @@ -32,15 +32,17 @@ pub trait CommandExt { #[stable(feature = "rust1", since = "1.0.0")] fn gid(&mut self, id: gid_t) -> &mut process::Command; - /// Create a new session (cf. `setsid(2)`) for the child process. This means that the child is - /// the leader of a new process group. The parent process remains the child reaper of the new - /// process. + /// Create a new session (cf. `setsid(2)`) for the child process. This means + /// that the child is the leader of a new process group. The parent process + /// remains the child reaper of the new process. /// - /// This is not enough to create a daemon process. The *init* process should be the child - /// reaper of a daemon. This can be achieved if the parent process exit. Moreover, a daemon - /// should not have a controlling terminal. To acheive this, a session leader (the child) must - /// spawn another process (the daemon) in the same session. - #[unstable(feature = "process_session_leader", reason = "recently added")] + /// This is not enough to create a daemon process. The *init* process should + /// be the child reaper of a daemon. This can be achieved if the parent + /// process exit. Moreover, a daemon should not have a controlling terminal. + /// To acheive this, a session leader (the child) must spawn another process + /// (the daemon) in the same session. + #[unstable(feature = "process_session_leader", reason = "recently added", + issue = "27811")] fn session_leader(&mut self, on: bool) -> &mut process::Command; } diff --git a/src/libstd/sys/windows/ext/io.rs b/src/libstd/sys/windows/ext/io.rs index 185f1abe64b..a203a23068e 100644 --- a/src/libstd/sys/windows/ext/io.rs +++ b/src/libstd/sys/windows/ext/io.rs @@ -52,7 +52,8 @@ pub trait FromRawHandle { /// A trait to express the ability to consume an object and acquire ownership of /// its raw `HANDLE`. -#[unstable(feature = "into_raw_os", reason = "recently added API")] +#[unstable(feature = "into_raw_os", reason = "recently added API", + issue = "27797")] pub trait IntoRawHandle { /// Consumes this object, returning the raw underlying handle. /// @@ -110,7 +111,8 @@ pub trait FromRawSocket { /// A trait to express the ability to consume an object and acquire ownership of /// its raw `SOCKET`. -#[unstable(feature = "into_raw_os", reason = "recently added API")] +#[unstable(feature = "into_raw_os", reason = "recently added API", + issue = "27797")] pub trait IntoRawSocket { /// Consumes this object, returning the raw underlying socket. /// diff --git a/src/libstd/thread/local.rs b/src/libstd/thread/local.rs index a228cbfd85b..c204f79614a 100644 --- a/src/libstd/thread/local.rs +++ b/src/libstd/thread/local.rs @@ -10,7 +10,7 @@ //! Thread local storage -#![unstable(feature = "thread_local_internals")] +#![unstable(feature = "thread_local_internals", issue = "0")] use cell::UnsafeCell; @@ -137,7 +137,8 @@ macro_rules! thread_local { #[doc(hidden)] #[unstable(feature = "thread_local_internals", - reason = "should not be necessary")] + reason = "should not be necessary", + issue = "0")] #[macro_export] #[allow_internal_unstable] macro_rules! __thread_local_inner { @@ -153,7 +154,8 @@ macro_rules! __thread_local_inner { /// Indicator of the state of a thread local storage key. #[unstable(feature = "thread_local_state", - reason = "state querying was recently added")] + reason = "state querying was recently added", + issue = "27716")] #[derive(Eq, PartialEq, Copy, Clone)] pub enum LocalKeyState { /// All keys are in this state whenever a thread starts. Keys will @@ -185,7 +187,8 @@ pub enum LocalKeyState { impl LocalKey { #[doc(hidden)] #[unstable(feature = "thread_local_internals", - reason = "recently added to create a key")] + reason = "recently added to create a key", + issue = "0")] pub const fn new(inner: fn() -> &'static __KeyInner, init: fn() -> T) -> LocalKey { LocalKey { @@ -248,7 +251,8 @@ impl LocalKey { /// to be able to be accessed. Keys in the `Destroyed` state will panic on /// any call to `with`. #[unstable(feature = "thread_local_state", - reason = "state querying was recently added")] + reason = "state querying was recently added", + issue = "27716")] pub fn state(&'static self) -> LocalKeyState { unsafe { match (self.inner)().get() { diff --git a/src/libstd/thread/mod.rs b/src/libstd/thread/mod.rs index 3435a1fccdf..3a4c3e7eef1 100644 --- a/src/libstd/thread/mod.rs +++ b/src/libstd/thread/mod.rs @@ -167,7 +167,6 @@ use any::Any; use cell::UnsafeCell; use fmt; use io; -use marker::PhantomData; use rt::{self, unwind}; use sync::{Mutex, Condvar, Arc}; use sys::thread as imp; @@ -185,8 +184,9 @@ use time::Duration; pub use self::local::{LocalKey, LocalKeyState}; #[unstable(feature = "scoped_tls", - reason = "scoped TLS has yet to have wide enough use to fully \ - consider stabilizing its interface")] + reason = "scoped TLS has yet to have wide enough use to fully \ + consider stabilizing its interface", + issue = "27715")] pub use self::scoped_tls::ScopedKey; #[doc(hidden)] pub use self::local::__KeyInner as __LocalKeyInner; @@ -375,7 +375,8 @@ pub fn panicking() -> bool { /// }); /// assert!(result.is_err()); /// ``` -#[unstable(feature = "catch_panic", reason = "recent API addition")] +#[unstable(feature = "catch_panic", reason = "recent API addition", + issue = "27719")] pub fn catch_panic(f: F) -> Result where F: FnOnce() -> R + Send + 'static { @@ -409,7 +410,8 @@ pub fn sleep_ms(ms: u32) { /// signal being received or a spurious wakeup. Platforms which do not support /// nanosecond precision for sleeping will have `dur` rounded up to the nearest /// granularity of time they can sleep for. -#[unstable(feature = "thread_sleep", reason = "waiting on Duration")] +#[unstable(feature = "thread_sleep", reason = "waiting on Duration", + issue = "27771")] pub fn sleep(dur: Duration) { imp::Thread::sleep(dur) } @@ -479,7 +481,8 @@ pub fn park_timeout_ms(ms: u32) { /// /// Platforms which do not support nanosecond precision for sleeping will have /// `dur` rounded up to the nearest granularity of time they can sleep for. -#[unstable(feature = "park_timeout", reason = "waiting on Duration")] +#[unstable(feature = "park_timeout", reason = "waiting on Duration", + issue = "27771")] pub fn park_timeout(dur: Duration) { let thread = current(); let mut guard = thread.inner.lock.lock().unwrap(); @@ -552,7 +555,7 @@ impl thread_info::NewThread for Thread { } //////////////////////////////////////////////////////////////////////////////// -// JoinHandle and JoinGuard +// JoinHandle //////////////////////////////////////////////////////////////////////////////// /// Indicates the manner in which a thread exited. @@ -578,7 +581,7 @@ struct Packet(Arc>>>); unsafe impl Send for Packet {} unsafe impl Sync for Packet {} -/// Inner representation for JoinHandle and JoinGuard +/// Inner representation for JoinHandle struct JoinInner { native: Option, thread: Thread, @@ -596,8 +599,7 @@ impl JoinInner { /// An owned permission to join on a thread (block on its termination). /// -/// Unlike a `JoinGuard`, a `JoinHandle` *detaches* the child thread -/// when it is dropped, rather than automatically joining on drop. +/// A `JoinHandle` *detaches* the child thread when it is dropped. /// /// Due to platform restrictions, it is not possible to `Clone` this /// handle: the ability to join a child thread is a uniquely-owned @@ -622,63 +624,9 @@ impl JoinHandle { } } -/// An RAII-style guard that will block until thread termination when dropped. -/// -/// The type `T` is the return type for the thread's main function. -/// -/// Joining on drop is necessary to ensure memory safety when stack -/// data is shared between a parent and child thread. -/// -/// Due to platform restrictions, it is not possible to `Clone` this -/// handle: the ability to join a child thread is a uniquely-owned -/// permission. -#[must_use = "thread will be immediately joined if `JoinGuard` is not used"] -#[unstable(feature = "scoped", - reason = "memory unsafe if destructor is avoided, see #24292")] -pub struct JoinGuard<'a, T: Send + 'a> { - inner: JoinInner, - _marker: PhantomData<&'a T>, -} - -#[stable(feature = "rust1", since = "1.0.0")] -unsafe impl<'a, T: Send + 'a> Sync for JoinGuard<'a, T> {} - -impl<'a, T: Send + 'a> JoinGuard<'a, T> { - /// Extracts a handle to the thread this guard will join on. - #[stable(feature = "rust1", since = "1.0.0")] - pub fn thread(&self) -> &Thread { - &self.inner.thread - } - - /// Waits for the associated thread to finish, returning the result of the - /// thread's calculation. - /// - /// # Panics - /// - /// Panics on the child thread are propagated by panicking the parent. - #[stable(feature = "rust1", since = "1.0.0")] - pub fn join(mut self) -> T { - match self.inner.join() { - Ok(res) => res, - Err(_) => panic!("child thread {:?} panicked", self.thread()), - } - } -} - -#[unstable(feature = "scoped", - reason = "memory unsafe if destructor is avoided, see #24292")] -impl<'a, T: Send + 'a> Drop for JoinGuard<'a, T> { - fn drop(&mut self) { - if self.inner.native.is_some() && self.inner.join().is_err() { - panic!("child thread {:?} panicked", self.thread()); - } - } -} - fn _assert_sync_and_send() { fn _assert_both() {} _assert_both::>(); - _assert_both::>(); _assert_both::(); } diff --git a/src/libstd/thread/scoped_tls.rs b/src/libstd/thread/scoped_tls.rs index 810e3bb62f7..bfcaabdbc17 100644 --- a/src/libstd/thread/scoped_tls.rs +++ b/src/libstd/thread/scoped_tls.rs @@ -40,7 +40,7 @@ //! }); //! ``` -#![unstable(feature = "thread_local_internals")] +#![unstable(feature = "thread_local_internals", issue = "0")] #[doc(hidden)] pub use self::imp::KeyInner as __KeyInner; @@ -54,7 +54,8 @@ pub use self::imp::KeyInner as __KeyInner; /// their contents. #[unstable(feature = "scoped_tls", reason = "scoped TLS has yet to have wide enough use to fully consider \ - stabilizing its interface")] + stabilizing its interface", + issue = "27715")] pub struct ScopedKey { inner: fn() -> &'static imp::KeyInner } /// Declare a new scoped thread local storage key. @@ -116,7 +117,8 @@ macro_rules! __scoped_thread_local_inner { #[unstable(feature = "scoped_tls", reason = "scoped TLS has yet to have wide enough use to fully consider \ - stabilizing its interface")] + stabilizing its interface", + issue = "27715")] impl ScopedKey { #[doc(hidden)] pub const fn new(inner: fn() -> &'static imp::KeyInner) -> ScopedKey { diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs index d16fa83c2af..2135b851032 100644 --- a/src/libstd/time/duration.rs +++ b/src/libstd/time/duration.rs @@ -64,7 +64,8 @@ impl Duration { #[unstable(feature = "duration_span", reason = "unsure if this is the right API or whether it should \ wait for a more general \"moment in time\" \ - abstraction")] + abstraction", + issue = "27799")] pub fn span(f: F) -> Duration where F: FnOnce() { let start = SteadyTime::now(); f();