about summary refs log tree commit diff
path: root/src/liballoc/slice.rs
diff options
context:
space:
mode:
authorCorey Farwell <coreyf@rwell.org>2018-02-22 19:53:44 -0500
committerCorey Farwell <coreyf@rwell.org>2018-02-22 20:12:38 -0500
commitb1a6c8bdd3a76207eff76b004945bc2a13755eca (patch)
tree5bf71b616992a858c052e8a2daf4c306135bb7e8 /src/liballoc/slice.rs
parentb1f8e6fb06d7362eeb2065347a7db94e76b1cb2f (diff)
downloadrust-b1a6c8bdd3a76207eff76b004945bc2a13755eca.tar.gz
rust-b1a6c8bdd3a76207eff76b004945bc2a13755eca.zip
Stabilize [T]::rotate_{left,right}
https://github.com/rust-lang/rust/issues/41891
Diffstat (limited to 'src/liballoc/slice.rs')
-rw-r--r--src/liballoc/slice.rs20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/liballoc/slice.rs b/src/liballoc/slice.rs
index 028983de556..dc40062ef13 100644
--- a/src/liballoc/slice.rs
+++ b/src/liballoc/slice.rs
@@ -1460,8 +1460,6 @@ impl<T> [T] {
     /// # Examples
     ///
     /// ```
-    /// #![feature(slice_rotate)]
-    ///
     /// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
     /// a.rotate_left(2);
     /// assert_eq!(a, ['c', 'd', 'e', 'f', 'a', 'b']);
@@ -1470,23 +1468,15 @@ impl<T> [T] {
     /// Rotating a subslice:
     ///
     /// ```
-    /// #![feature(slice_rotate)]
-    ///
     /// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
     /// a[1..5].rotate_left(1);
     /// assert_eq!(a, ['a', 'c', 'd', 'e', 'b', 'f']);
-    /// ```
-    #[unstable(feature = "slice_rotate", issue = "41891")]
+   /// ```
+    #[stable(feature = "slice_rotate", since = "1.26.0")]
     pub fn rotate_left(&mut self, mid: usize) {
         core_slice::SliceExt::rotate_left(self, mid);
     }
 
-    #[unstable(feature = "slice_rotate", issue = "41891")]
-    #[rustc_deprecated(since = "", reason = "renamed to `rotate_left`")]
-    pub fn rotate(&mut self, mid: usize) {
-        core_slice::SliceExt::rotate_left(self, mid);
-    }
-
     /// Rotates the slice in-place such that the first `self.len() - k`
     /// elements of the slice move to the end while the last `k` elements move
     /// to the front. After calling `rotate_right`, the element previously at
@@ -1505,8 +1495,6 @@ impl<T> [T] {
     /// # Examples
     ///
     /// ```
-    /// #![feature(slice_rotate)]
-    ///
     /// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
     /// a.rotate_right(2);
     /// assert_eq!(a, ['e', 'f', 'a', 'b', 'c', 'd']);
@@ -1515,13 +1503,11 @@ impl<T> [T] {
     /// Rotate a subslice:
     ///
     /// ```
-    /// #![feature(slice_rotate)]
-    ///
     /// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
     /// a[1..5].rotate_right(1);
     /// assert_eq!(a, ['a', 'e', 'b', 'c', 'd', 'f']);
     /// ```
-    #[unstable(feature = "slice_rotate", issue = "41891")]
+    #[stable(feature = "slice_rotate", since = "1.26.0")]
     pub fn rotate_right(&mut self, k: usize) {
         core_slice::SliceExt::rotate_right(self, k);
     }