diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 2624df78a76..16e3c9e52fa 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -583,6 +583,8 @@ impl [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) };