mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-23 12:23:22 +00:00
enable slice_swap_unchecked
feature in doc test
This commit is contained in:
parent
1afe14ceed
commit
14769ce96f
@ -583,6 +583,8 @@ impl<T> [T] {
|
||||
/// # Examples
|
||||
///
|
||||
/// ```
|
||||
/// #![feature(slice_swap_unchecked)]
|
||||
///
|
||||
/// let mut v = ["a", "b", "c", "d"];
|
||||
/// // SAFETY: we know that 1 and 3 are both indices of the slice
|
||||
/// unsafe { v.swap_unchecked(1, 3) };
|
||||
|
Loading…
Reference in New Issue
Block a user