#![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
/// Swapping two elements across slices:
///
/// ```
- /// #![feature(swap_with_slice)]
- ///
/// let mut slice1 = [0, 0];
/// let mut slice2 = [1, 2, 3, 4];
///
/// 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!
/// ```
/// mutable sub-slices from a slice:
///
/// ```
- /// #![feature(swap_with_slice)]
- ///
/// let mut slice = [1, 2, 3, 4, 5];
///
/// {
/// ```
///
/// [`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)
}
#[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")]