From 9854d30543b34443a17537acfd1caff64b8a2697 Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Sun, 1 Aug 2021 17:25:19 +0200 Subject: [PATCH] Update const_slice_first_last_not_mut stable version. --- library/core/src/slice/mod.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 06ef9fcbdea..e7cc34c30b1 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 }