Skip to content

Commit f52dceb

Browse files
authored
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: rust-lang/rust#74985 (comment) 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: rust-lang/rust#74985 (comment)
2 parents f1094d7 + 5523b66 commit f52dceb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

tests/pass/slices.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
//@revisions: stack tree
22
//@[tree]compile-flags: -Zmiri-tree-borrows
33
//@compile-flags: -Zmiri-strict-provenance
4-
#![feature(slice_as_chunks)]
54
#![feature(slice_partition_dedup)]
65
#![feature(layout_for_ptr)]
76

@@ -227,7 +226,7 @@ fn test_for_invalidated_pointers() {
227226

228227
buffer.reverse();
229228

230-
// Calls `fn as_chunks_unchecked_mut` internally (requires unstable `#![feature(slice_as_chunks)]`):
229+
// Calls `fn as_chunks_unchecked_mut` internally:
231230
assert_eq!(2, buffer.as_chunks_mut::<32>().0.len());
232231
for chunk in buffer.as_chunks_mut::<32>().0 {
233232
for elem in chunk {

0 commit comments

Comments
 (0)