diff options
| author | bors <bors@rust-lang.org> | 2018-04-18 19:47:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-04-18 19:47:56 +0000 |
| commit | ac3c2288f9f9d977acb46406ba60033d65165a7b (patch) | |
| tree | 8dd14931165ad832b8a97b587f7fa05ccf7438eb /src/liballoc | |
| parent | c8fa49f83b78cb80b74d7a61ade32a4cc980bfdc (diff) | |
| parent | fd042eee0002bc2640447c08034de00171ca1aa3 (diff) | |
| download | rust-ac3c2288f9f9d977acb46406ba60033d65165a7b.tar.gz rust-ac3c2288f9f9d977acb46406ba60033d65165a7b.zip | |
Auto merge of #50017 - tinaun:stabilize-all-the-things, r=sfackler
stabilize a bunch of minor api additions besides `ptr::NonNull::cast` (which is 4 days away from end of FCP) all of these have been finished with FCP for a few weeks now with minimal issues raised * Closes #41020 * Closes #42818 * Closes #44030 * Closes #44400 * Closes #46507 * Closes #47653 * Closes #46344 the following functions will be stabilized in 1.27: * `[T]::rsplit` * `[T]::rsplit_mut` * `[T]::swap_with_slice` * `ptr::swap_nonoverlapping` * `NonNull::cast` * `Duration::from_micros` * `Duration::from_nanos` * `Duration::subsec_millis` * `Duration::subsec_micros` * `HashMap::remove_entry`
Diffstat (limited to 'src/liballoc')
| -rw-r--r-- | src/liballoc/lib.rs | 4 | ||||
| -rw-r--r-- | src/liballoc/slice.rs | 19 |
2 files changed, 5 insertions, 18 deletions
diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 3a106a2ff5c..163aef61b43 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -99,7 +99,6 @@ #![feature(lang_items)] #![feature(libc)] #![feature(needs_allocator)] -#![feature(nonnull_cast)] #![feature(nonzero)] #![feature(optin_builtin_traits)] #![feature(pattern)] @@ -108,7 +107,6 @@ #![feature(ptr_offset_from)] #![feature(rustc_attrs)] #![feature(slice_get_slice)] -#![feature(slice_rsplit)] #![feature(specialization)] #![feature(staged_api)] #![feature(str_internals)] @@ -124,7 +122,7 @@ #![feature(inclusive_range_fields)] #![cfg_attr(stage0, feature(generic_param_attrs))] -#![cfg_attr(not(test), feature(fn_traits, swap_with_slice, i128))] +#![cfg_attr(not(test), feature(fn_traits, i128))] #![cfg_attr(test, feature(test))] // Allow testing this library diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs index 56c53fca62c..33e652856e8 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -116,7 +116,7 @@ pub use core::slice::{Iter, IterMut}; pub use core::slice::{SplitMut, ChunksMut, Split}; #[stable(feature = "rust1", since = "1.0.0")] pub use core::slice::{SplitN, RSplitN, SplitNMut, RSplitNMut}; -#[unstable(feature = "slice_rsplit", issue = "41020")] +#[stable(feature = "slice_rsplit", since = "1.27.0")] pub use core::slice::{RSplit, RSplitMut}; #[stable(feature = "rust1", since = "1.0.0")] pub use core::slice::{from_raw_parts, from_raw_parts_mut}; @@ -888,7 +888,6 @@ impl<T> [T] { /// # Examples /// /// ``` - /// #![feature(slice_rsplit)] /// /// let slice = [11, 22, 33, 0, 44, 55]; /// let mut iter = slice.rsplit(|num| *num == 0); @@ -902,8 +901,6 @@ impl<T> [T] { /// slice will be the first (or last) item returned by the iterator. /// /// ``` - /// #![feature(slice_rsplit)] - /// /// let v = &[0, 1, 1, 2, 3, 5, 8]; /// let mut it = v.rsplit(|n| *n % 2 == 0); /// assert_eq!(it.next().unwrap(), &[]); @@ -912,7 +909,7 @@ impl<T> [T] { /// assert_eq!(it.next().unwrap(), &[]); /// assert_eq!(it.next(), None); /// ``` - #[unstable(feature = "slice_rsplit", issue = "41020")] + #[stable(feature = "slice_rsplit", since = "1.27.0")] #[inline] pub fn rsplit<F>(&self, pred: F) -> RSplit<T, F> where F: FnMut(&T) -> bool @@ -927,8 +924,6 @@ impl<T> [T] { /// # Examples /// /// ``` - /// #![feature(slice_rsplit)] - /// /// let mut v = [100, 400, 300, 200, 600, 500]; /// /// let mut count = 0; @@ -939,7 +934,7 @@ impl<T> [T] { /// assert_eq!(v, [3, 400, 300, 2, 600, 1]); /// ``` /// - #[unstable(feature = "slice_rsplit", issue = "41020")] + #[stable(feature = "slice_rsplit", since = "1.27.0")] #[inline] pub fn rsplit_mut<F>(&mut self, pred: F) -> RSplitMut<T, F> where F: FnMut(&T) -> bool @@ -1707,8 +1702,6 @@ impl<T> [T] { /// Swapping two elements across slices: /// /// ``` - /// #![feature(swap_with_slice)] - /// /// let mut slice1 = [0, 0]; /// let mut slice2 = [1, 2, 3, 4]; /// @@ -1724,8 +1717,6 @@ impl<T> [T] { /// a compile failure: /// /// ```compile_fail - /// #![feature(swap_with_slice)] - /// /// let mut slice = [1, 2, 3, 4, 5]; /// slice[..2].swap_with_slice(&mut slice[3..]); // compile fail! /// ``` @@ -1734,8 +1725,6 @@ impl<T> [T] { /// mutable sub-slices from a slice: /// /// ``` - /// #![feature(swap_with_slice)] - /// /// let mut slice = [1, 2, 3, 4, 5]; /// /// { @@ -1747,7 +1736,7 @@ impl<T> [T] { /// ``` /// /// [`split_at_mut`]: #method.split_at_mut - #[unstable(feature = "swap_with_slice", issue = "44030")] + #[stable(feature = "swap_with_slice", since = "1.27.0")] pub fn swap_with_slice(&mut self, other: &mut [T]) { core_slice::SliceExt::swap_with_slice(self, other) } |
