Correct the const stabilization of <[T]>::last_chunk · model-checking/verify-rust-std@313484b (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Commit 313484b

Correct the const stabilization of <[T]>::last_chunk

`<[T]>::first_chunk` became const stable in 1.77, but `<[T]>::last_chunk` was left out. This was fixed in 3488679, which reached stable in 1.80, making `<[T]>::last_chunk` const stable as of that version, but it is documented as being const stable as 1.77. While this is what should have happened, the documentation should reflect what actually did happen.

File tree

1 file changed

lines changed

1 file changed

lines changed

Original file line number Diff line number Diff line change
@@ -522,7 +522,7 @@ impl [T] {
522 522 /// ```
523 523 #[inline]
524 524 #[stable(feature = "slice_first_last_chunk", since = "1.77.0")]
525 -#[rustc_const_stable(feature = "slice_first_last_chunk", since = "1.77.0")]
525 +#[rustc_const_stable(feature = "const_slice_last_chunk", since = "1.80.0")]
526 526 pub const fn last_chunk<const N: usize>(&self) -> Option<&[T; N]> {
527 527 if self.len() < N {
528 528 None