diff options
| author | bors <bors@rust-lang.org> | 2017-07-26 23:40:48 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-07-26 23:40:48 +0000 |
| commit | ddaab61101e48f0a58ce176b5a6aff11ae36c986 (patch) | |
| tree | a0092e50572f90c99bdd169a86cbd301a797138e /src/liballoc | |
| parent | 599be0d18f4c6ddf36366d2a5a2ca6dc65886896 (diff) | |
| parent | 16707d43483ef8b776b941f056dc1ea78ebd7c77 (diff) | |
Auto merge of #43373 - alexcrichton:stabilize-1.20.0, r=aturon
Stabilize more APIs for the 1.20.0 release In addition to the few stabilizations that have already landed, this cleans up the remaining APIs that are in `final-comment-period` right now to be stable by the 1.20.0 release
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/lib.rs | 4 | ||||
| -rw-r--r-- | src/liballoc/str.rs | 18 | ||||
| -rw-r--r-- | src/liballoc/tests/lib.rs | 2 |
3 files changed, 7 insertions, 17 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 91653f87a30..227fcfabcf1 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -79,11 +79,9 @@ #![cfg_attr(test, allow(deprecated))] // rand #![cfg_attr(test, feature(placement_in))] -#![cfg_attr(not(test), feature(char_escape_debug))] #![cfg_attr(not(test), feature(core_float))] #![cfg_attr(not(test), feature(exact_size_is_empty))] #![cfg_attr(not(test), feature(slice_rotate))] -#![cfg_attr(not(test), feature(str_checked_slicing))] #![cfg_attr(test, feature(rand, test))] #![feature(allow_internal_unstable)] #![feature(box_patterns)] @@ -102,7 +100,6 @@ #![feature(i128_type)] #![feature(inclusive_range)] #![feature(lang_items)] -#![feature(manually_drop)] #![feature(needs_allocator)] #![feature(nonzero)] #![feature(offset_to)] @@ -117,7 +114,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 f56288c3013..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) @@ -328,14 +328,13 @@ impl str { /// # Examples /// /// ``` - /// # #![feature(str_checked_slicing)] /// let v = "🗻∈🌏"; /// assert_eq!(Some("🗻"), v.get(0..4)); /// assert!(v.get(1..).is_none()); /// assert!(v.get(..8).is_none()); /// assert!(v.get(..42).is_none()); /// ``` - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] #[inline] pub fn get<I: SliceIndex<str>>(&self, i: I) -> Option<&I::Output> { core_str::StrExt::get(self, i) @@ -351,14 +350,13 @@ impl str { /// # Examples /// /// ``` - /// # #![feature(str_checked_slicing)] /// let mut v = String::from("🗻∈🌏"); /// assert_eq!(Some("🗻"), v.get_mut(0..4).map(|v| &*v)); /// assert!(v.get_mut(1..).is_none()); /// assert!(v.get_mut(..8).is_none()); /// assert!(v.get_mut(..42).is_none()); /// ``` - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] #[inline] pub fn get_mut<I: SliceIndex<str>>(&mut self, i: I) -> Option<&mut I::Output> { core_str::StrExt::get_mut(self, i) @@ -383,7 +381,6 @@ impl str { /// # Examples /// /// ``` - /// # #![feature(str_checked_slicing)] /// let v = "🗻∈🌏"; /// unsafe { /// assert_eq!("🗻", v.get_unchecked(0..4)); @@ -391,7 +388,7 @@ impl str { /// assert_eq!("🌏", v.get_unchecked(7..11)); /// } /// ``` - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] #[inline] pub unsafe fn get_unchecked<I: SliceIndex<str>>(&self, i: I) -> &I::Output { core_str::StrExt::get_unchecked(self, i) @@ -416,7 +413,6 @@ impl str { /// # Examples /// /// ``` - /// # #![feature(str_checked_slicing)] /// let mut v = String::from("🗻∈🌏"); /// unsafe { /// assert_eq!("🗻", v.get_unchecked_mut(0..4)); @@ -424,7 +420,7 @@ impl str { /// assert_eq!("🌏", v.get_unchecked_mut(7..11)); /// } /// ``` - #[unstable(feature = "str_checked_slicing", issue = "39932")] + #[stable(feature = "str_checked_slicing", since = "1.20.0")] #[inline] pub unsafe fn get_unchecked_mut<I: SliceIndex<str>>(&mut self, i: I) -> &mut I::Output { core_str::StrExt::get_unchecked_mut(self, i) @@ -1729,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() } @@ -1996,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) } diff --git a/src/liballoc/tests/lib.rs b/src/liballoc/tests/lib.rs index c6d70ee7575..27b23d14059 100644 --- a/src/liballoc/tests/lib.rs +++ b/src/liballoc/tests/lib.rs @@ -24,12 +24,10 @@ #![feature(repr_align)] #![feature(slice_rotate)] #![feature(splice)] -#![feature(str_checked_slicing)] #![feature(str_escape)] #![feature(test)] #![feature(unboxed_closures)] #![feature(unicode)] -#![feature(utf8_error_error_len)] extern crate alloc; extern crate test; |
