Skip to content

Commit

Permalink
Correct the const stabilization of last_chunk for slices
Browse files Browse the repository at this point in the history
`<[T]>::last_chunk` should have become const stable as part of
<rust-lang#117561>. Update the const
stability gate to reflect this.
  • Loading branch information
tgross35 committed May 7, 2024
1 parent d71b3f4 commit 3488679
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ impl<T> [T] {
/// ```
#[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
Expand Down

0 comments on commit 3488679

Please sign in to comment.