about summary refs log tree commit diff
path: root/src
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
parent41c211d2043df20b2ff5c9a13f8c7d711f74c13a (diff)
downloadrust-78a8c257032b18b5ca63f41b18d2fe7d57d1cffa.tar.gz
rust-78a8c257032b18b5ca63f41b18d2fe7d57d1cffa.zip
stabilize `swap_with_slice` feature
Diffstat (limited to 'src')
-rw-r--r--src/liballoc/lib.rs2
-rw-r--r--src/liballoc/slice.rs8
-rw-r--r--src/libcore/slice/mod.rs2
3 files changed, 3 insertions, 9 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)
     }
diff --git a/src/libcore/slice/mod.rs b/src/libcore/slice/mod.rs
index 68f081c2e87..afb149f2997 100644
--- a/src/libcore/slice/mod.rs
+++ b/src/libcore/slice/mod.rs
@@ -223,7 +223,7 @@ pub trait SliceExt {
     #[stable(feature = "copy_from_slice", since = "1.9.0")]
     fn copy_from_slice(&mut self, src: &[Self::Item]) where Self::Item: Copy;
 
-    #[unstable(feature = "swap_with_slice", issue = "44030")]
+    #[stable(feature = "swap_with_slice", since = "1.27.0")]
     fn swap_with_slice(&mut self, src: &mut [Self::Item]);
 
     #[stable(feature = "sort_unstable", since = "1.20.0")]