From 78a8c257032b18b5ca63f41b18d2fe7d57d1cffa Mon Sep 17 00:00:00 2001 From: tinaun Date: Tue, 17 Apr 2018 00:40:07 -0400 Subject: stabilize `swap_with_slice` feature --- src/liballoc/lib.rs | 2 +- src/liballoc/slice.rs | 8 +------- 2 files changed, 2 insertions(+), 8 deletions(-) (limited to 'src/liballoc') diff --git a/src/liballoc/lib.rs b/src/liballoc/lib.rs index 87ad2751c5b..f2a61bda4aa 100644 --- a/src/liballoc/lib.rs +++ b/src/liballoc/lib.rs @@ -123,7 +123,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 eb8a293013d..33e652856e8 100644 --- a/src/liballoc/slice.rs +++ b/src/liballoc/slice.rs @@ -1702,8 +1702,6 @@ impl [T] { /// Swapping two elements across slices: /// /// ``` - /// #![feature(swap_with_slice)] - /// /// let mut slice1 = [0, 0]; /// let mut slice2 = [1, 2, 3, 4]; /// @@ -1719,8 +1717,6 @@ impl [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! /// ``` @@ -1729,8 +1725,6 @@ impl [T] { /// mutable sub-slices from a slice: /// /// ``` - /// #![feature(swap_with_slice)] - /// /// let mut slice = [1, 2, 3, 4, 5]; /// /// { @@ -1742,7 +1736,7 @@ impl [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) } -- cgit 1.4.1-3-g733a5