From b46b05d1d2374a788787ce3d850d06794a6174c0 Mon Sep 17 00:00:00 2001 From: Trevor Spiteri Date: Mon, 20 Feb 2023 16:55:24 +0100 Subject: [PATCH] Stabilize const slice::split_at This stabilizes the use of the following method in const context: impl [T] { pub const fn split_at(&self, mid: usize) -> (&[T], &[T]); } --- library/core/src/slice/mod.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index e8374784501..fae5ce4128a 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -1596,7 +1596,8 @@ pub fn group_by_mut(&mut self, pred: F) -> GroupByMut<'_, T, F> /// } /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_unstable(feature = "const_slice_split_at_not_mut", issue = "101158")] + #[rustc_const_stable(feature = "const_slice_split_at_not_mut", since = "CURRENT_RUSTC_VERSION")] + #[rustc_allow_const_fn_unstable(slice_split_at_unchecked)] #[inline] #[track_caller] #[must_use]