Correct the const stabilization of last_chunk for slices

`<[T]>::last_chunk` should have become const stable as part of
<https://github.com/rust-lang/rust/pull/117561>. Update the const
stability gate to reflect this.
This commit is contained in:
Trevor Gross 2024-05-07 03:03:44 -05:00
parent d71b3f486a
commit 3488679768

View File

@ -544,7 +544,7 @@ pub const fn split_last_chunk_mut<const N: usize>(
/// ```
#[inline]
#[stable(feature = "slice_first_last_chunk", since = "1.77.0")]
#[rustc_const_unstable(feature = "const_slice_first_last_chunk", issue = "111774")]
#[rustc_const_stable(feature = "slice_first_last_chunk", since = "1.77.0")]
pub const fn last_chunk<const N: usize>(&self) -> Option<&[T; N]> {
if self.len() < N {
None