Skip to content

Commit 14769ce

Browse files
committed
enable slice_swap_unchecked feature in doc test
1 parent 1afe14c commit 14769ce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

library/core/src/slice/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -583,6 +583,8 @@ impl<T> [T] {
583583
/// # Examples
584584
///
585585
/// ```
586+
/// #![feature(slice_swap_unchecked)]
587+
///
586588
/// let mut v = ["a", "b", "c", "d"];
587589
/// // SAFETY: we know that 1 and 3 are both indices of the slice
588590
/// unsafe { v.swap_unchecked(1, 3) };

0 commit comments

Comments
 (0)