stabilize swap_with_slice feature

This commit is contained in:
tinaun
2018-04-17 00:40:07 -04:00
parent 41c211d204
commit 78a8c25703
3 changed files with 3 additions and 9 deletions

View File

@@ -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

View File

@@ -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)
}