@@ -1468,9 +1468,9 @@ impl<T> [T] {
1468
1468
core_slice:: SliceExt :: copy_from_slice ( self , src)
1469
1469
}
1470
1470
1471
- /// Swaps all elements in `self` with those in `src `.
1471
+ /// Swaps all elements in `self` with those in `other `.
1472
1472
///
1473
- /// The length of `src ` must be the same as `self`.
1473
+ /// The length of `other ` must be the same as `self`.
1474
1474
///
1475
1475
/// # Panics
1476
1476
///
@@ -1481,16 +1481,16 @@ impl<T> [T] {
1481
1481
/// ```
1482
1482
/// #![feature(swap_with_slice)]
1483
1483
///
1484
- /// let mut src = [1, 2, 3];
1485
- /// let mut dst = [7, 8, 9];
1484
+ /// let mut slice1 = [1, 2, 3];
1485
+ /// let mut slice2 = [7, 8, 9];
1486
1486
///
1487
- /// src .swap_with_slice(&mut dst );
1488
- /// assert_eq!(src , [7, 8, 9]);
1489
- /// assert_eq!(dst , [1, 2, 3]);
1487
+ /// slice1 .swap_with_slice(&mut slice2 );
1488
+ /// assert_eq!(slice1 , [7, 8, 9]);
1489
+ /// assert_eq!(slice2 , [1, 2, 3]);
1490
1490
/// ```
1491
1491
#[ unstable( feature = "swap_with_slice" , issue = "44030" ) ]
1492
- pub fn swap_with_slice ( & mut self , src : & mut [ T ] ) {
1493
- core_slice:: SliceExt :: swap_with_slice ( self , src )
1492
+ pub fn swap_with_slice ( & mut self , other : & mut [ T ] ) {
1493
+ core_slice:: SliceExt :: swap_with_slice ( self , other )
1494
1494
}
1495
1495
1496
1496
/// Copies `self` into a new `Vec`.
0 commit comments