Rollup merge of #139656 - scottmcm:stabilize-slice-as-chunks, r=dtolnay

Stabilize `slice_as_chunks` library feature

~~Draft as this needs #139163 to land first.~~

FCP: https://github.com/rust-lang/rust/issues/74985#issuecomment-2769963395

Methods being stabilized are:
```rust
impl [T] {
    const fn as_chunks<const N: usize>(&self) -> (&[[T; N]], &[T]);
    const fn as_rchunks<const N: usize>(&self) -> (&[T], &[[T; N]]);
    const unsafe fn as_chunks_unchecked<const N: usize>(&self) -> &[[T; N]];
    const fn as_chunks_mut<const N: usize>(&mut self) -> (&mut [[T; N]], &mut [T]);
    const fn as_rchunks_mut<const N: usize>(&mut self) -> (&mut [T], &mut [[T; N]]);
    const unsafe fn as_chunks_unchecked_mut<const N: usize>(&mut self) -> &mut [[T; N]];
}
```

~~(FCP's not done quite yet, but will in another day if I'm counting right.)~~ FCP Complete: https://github.com/rust-lang/rust/issues/74985#issuecomment-2797951535
This commit is contained in:
Chris Denton
2025-04-28 23:29:15 +00:00
committed by GitHub
6 changed files with 107 additions and 27 deletions

View File

@@ -31,7 +31,6 @@
#![feature(round_char_boundary)]
#![feature(rustc_attrs)]
#![feature(rustdoc_internals)]
#![feature(slice_as_chunks)]
// tidy-alphabetical-end
// The code produced by the `Encodable`/`Decodable` derive macros refer to