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:
parent
d71b3f486a
commit
3488679768
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue