@@ -1460,8 +1460,6 @@ impl<T> [T] {
1460
1460
/// # Examples
1461
1461
///
1462
1462
/// ```
1463
- /// #![feature(slice_rotate)]
1464
- ///
1465
1463
/// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
1466
1464
/// a.rotate_left(2);
1467
1465
/// assert_eq!(a, ['c', 'd', 'e', 'f', 'a', 'b']);
@@ -1470,23 +1468,15 @@ impl<T> [T] {
1470
1468
/// Rotating a subslice:
1471
1469
///
1472
1470
/// ```
1473
- /// #![feature(slice_rotate)]
1474
- ///
1475
1471
/// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
1476
1472
/// a[1..5].rotate_left(1);
1477
1473
/// assert_eq!(a, ['a', 'c', 'd', 'e', 'b', 'f']);
1478
- /// ```
1479
- #[ unstable ( feature = "slice_rotate" , issue = "41891 " ) ]
1474
+ /// ```
1475
+ #[ stable ( feature = "slice_rotate" , since = "1.26.0 " ) ]
1480
1476
pub fn rotate_left ( & mut self , mid : usize ) {
1481
1477
core_slice:: SliceExt :: rotate_left ( self , mid) ;
1482
1478
}
1483
1479
1484
- #[ unstable( feature = "slice_rotate" , issue = "41891" ) ]
1485
- #[ rustc_deprecated( since = "" , reason = "renamed to `rotate_left`" ) ]
1486
- pub fn rotate ( & mut self , mid : usize ) {
1487
- core_slice:: SliceExt :: rotate_left ( self , mid) ;
1488
- }
1489
-
1490
1480
/// Rotates the slice in-place such that the first `self.len() - k`
1491
1481
/// elements of the slice move to the end while the last `k` elements move
1492
1482
/// to the front. After calling `rotate_right`, the element previously at
@@ -1505,8 +1495,6 @@ impl<T> [T] {
1505
1495
/// # Examples
1506
1496
///
1507
1497
/// ```
1508
- /// #![feature(slice_rotate)]
1509
- ///
1510
1498
/// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
1511
1499
/// a.rotate_right(2);
1512
1500
/// assert_eq!(a, ['e', 'f', 'a', 'b', 'c', 'd']);
@@ -1515,13 +1503,11 @@ impl<T> [T] {
1515
1503
/// Rotate a subslice:
1516
1504
///
1517
1505
/// ```
1518
- /// #![feature(slice_rotate)]
1519
- ///
1520
1506
/// let mut a = ['a', 'b', 'c', 'd', 'e', 'f'];
1521
1507
/// a[1..5].rotate_right(1);
1522
1508
/// assert_eq!(a, ['a', 'e', 'b', 'c', 'd', 'f']);
1523
1509
/// ```
1524
- #[ unstable ( feature = "slice_rotate" , issue = "41891 " ) ]
1510
+ #[ stable ( feature = "slice_rotate" , since = "1.26.0 " ) ]
1525
1511
pub fn rotate_right ( & mut self , k : usize ) {
1526
1512
core_slice:: SliceExt :: rotate_right ( self , k) ;
1527
1513
}
0 commit comments