]> git.lizzy.rs Git - rust.git/commitdiff
stabilize `swap_with_slice` feature
authortinaun <tinagma@gmail.com>
Tue, 17 Apr 2018 04:40:07 +0000 (00:40 -0400)
committertinaun <tinagma@gmail.com>
Tue, 17 Apr 2018 04:49:24 +0000 (00:49 -0400)
src/liballoc/lib.rs
src/liballoc/slice.rs
src/libcore/slice/mod.rs

index 87ad2751c5b78358a0cd25ece05846dfae51c79a..f2a61bda4aa84b0054694165cb6b70040edfa08f 100644 (file)
 #![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
index eb8a293013d9e2a9cb27bd8fe0fac52d7d9cea73..33e652856e816f2122b9dc5db91856b940c5c7ee 100644 (file)
@@ -1702,8 +1702,6 @@ pub fn copy_from_slice(&mut self, src: &[T]) where T: Copy {
     /// 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 @@ pub fn copy_from_slice(&mut self, src: &[T]) where T: Copy {
     /// 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 @@ pub fn copy_from_slice(&mut self, src: &[T]) where T: Copy {
     /// mutable sub-slices from a slice:
     ///
     /// ```
-    /// #![feature(swap_with_slice)]
-    ///
     /// let mut slice = [1, 2, 3, 4, 5];
     ///
     /// {
@@ -1742,7 +1736,7 @@ pub fn copy_from_slice(&mut self, src: &[T]) where T: Copy {
     /// ```
     ///
     /// [`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)
     }
index 68f081c2e879c4bfd4285787e738ebe5c2b887bc..afb149f29977c018cf82459893a4de64747128c8 100644 (file)
@@ -223,7 +223,7 @@ unsafe fn get_unchecked_mut<I>(&mut self, index: I) -> &mut I::Output
     #[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")]