From 5f625620b5e4e29919400a0ee863942e5bf3d970 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Thu, 13 Aug 2015 10:12:38 -0700 Subject: std: Add issues to all unstable features --- src/libstd/ffi/c_str.rs | 19 ++++++++++++------- src/libstd/ffi/os_str.rs | 9 +++------ 2 files changed, 15 insertions(+), 13 deletions(-) (limited to 'src/libstd/ffi') 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()) } -- cgit 1.4.1-3-g733a5