about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-07-20 15:52:12 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-07-25 07:10:42 -0700
commit16707d43483ef8b776b941f056dc1ea78ebd7c77 (patch)
tree30006a154720c50cf5481f5cd81fc1b55f1f8d43 /src/liballoc
parent20b4f86d13b177bf66d1fa4fefbfcc1bb552cb94 (diff)
downloadrust-16707d43483ef8b776b941f056dc1ea78ebd7c77.tar.gz
rust-16707d43483ef8b776b941f056dc1ea78ebd7c77.zip
std: Stabilize the `str_{mut,box}_extras` feature
Stabilizes

* `<&mut str>::as_bytes_mut`
* `<Box<str>>::into_boxed_bytes`
* `std::str::from_boxed_utf8_unchecked`
* `std::str::from_utf8_mut`
* `std::str::from_utf8_unchecked_mut`

Closes #41119
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/lib.rs1
-rw-r--r--src/liballoc/str.rs6
2 files changed, 3 insertions, 4 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs
index 7c25dcada71..a168134edf4 100644
--- a/src/liballoc/lib.rs
+++ b/src/liballoc/lib.rs
@@ -115,7 +115,6 @@
 #![feature(specialization)]
 #![feature(staged_api)]
 #![feature(str_internals)]
-#![feature(str_mut_extras)]
 #![feature(trusted_len)]
 #![feature(unboxed_closures)]
 #![feature(unicode)]
diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs
index e4953988c5c..4df13c509a8 100644
--- a/src/liballoc/str.rs
+++ b/src/liballoc/str.rs
@@ -290,7 +290,7 @@ impl str {
     }
 
     /// Converts a mutable string slice to a mutable byte slice.
-    #[unstable(feature = "str_mut_extras", issue = "41119")]
+    #[stable(feature = "str_mut_extras", since = "1.20.0")]
     #[inline(always)]
     pub unsafe fn as_bytes_mut(&mut self) -> &mut [u8] {
         core_str::StrExt::as_bytes_mut(self)
@@ -1725,7 +1725,7 @@ impl str {
     }
 
     /// Converts a `Box<str>` into a `Box<[u8]>` without copying or allocating.
-    #[unstable(feature = "str_box_extras", issue = "41119")]
+    #[stable(feature = "str_box_extras", since = "1.20.0")]
     pub fn into_boxed_bytes(self: Box<str>) -> Box<[u8]> {
         self.into()
     }
@@ -1992,7 +1992,7 @@ impl str {
 
 /// Converts a boxed slice of bytes to a boxed string slice without checking
 /// that the string contains valid UTF-8.
-#[unstable(feature = "str_box_extras", issue = "41119")]
+#[stable(feature = "str_box_extras", since = "1.20.0")]
 pub unsafe fn from_boxed_utf8_unchecked(v: Box<[u8]>) -> Box<str> {
     mem::transmute(v)
 }