about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authortinaun <tinagma@gmail.com>2018-04-17 00:40:07 -0400
committertinaun <tinagma@gmail.com>2018-04-17 00:49:24 -0400
commit78a8c257032b18b5ca63f41b18d2fe7d57d1cffa (patch)
tree7903bfaffb093a9760c1da6907f2f44297fd7eb3 /src/liballoc
parent41c211d2043df20b2ff5c9a13f8c7d711f74c13a (diff)
downloadrust-78a8c257032b18b5ca63f41b18d2fe7d57d1cffa.tar.gz
rust-78a8c257032b18b5ca63f41b18d2fe7d57d1cffa.zip
stabilize `swap_with_slice` feature
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/lib.rs2
-rw-r--r--src/liballoc/slice.rs8
2 files changed, 2 insertions, 8 deletions
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> [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> [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> [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> [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)
     }