Auto merge of #124836 - tgross35:const-slice-last-chunk, r=BurntSushi
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:
commit
cc8d9b6927
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user