diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 06ef9fcbdea87..e7cc34c30b1b6 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -140,7 +140,7 @@ impl [T] { /// assert_eq!(None, w.first()); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.55.0")] + #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.56.0")] #[inline] pub const fn first(&self) -> Option<&T> { if let [first, ..] = self { Some(first) } else { None } @@ -178,7 +178,7 @@ impl [T] { /// } /// ``` #[stable(feature = "slice_splits", since = "1.5.0")] - #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.55.0")] + #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.56.0")] #[inline] pub const fn split_first(&self) -> Option<(&T, &[T])> { if let [first, tail @ ..] = self { Some((first, tail)) } else { None } @@ -218,7 +218,7 @@ impl [T] { /// } /// ``` #[stable(feature = "slice_splits", since = "1.5.0")] - #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.55.0")] + #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.56.0")] #[inline] pub const fn split_last(&self) -> Option<(&T, &[T])> { if let [init @ .., last] = self { Some((last, init)) } else { None } @@ -257,7 +257,7 @@ impl [T] { /// assert_eq!(None, w.last()); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.55.0")] + #[rustc_const_stable(feature = "const_slice_first_last_not_mut", since = "1.56.0")] #[inline] pub const fn last(&self) -> Option<&T> { if let [.., last] = self { Some(last) } else { None }