about summary refs log tree commit diff
path: root/library/alloc/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2020-09-12 03:59:46 +0000
committerbors <bors@rust-lang.org>2020-09-12 03:59:46 +0000
commit8b6838b6e1637b430b0c77294d938effd8e36eb8 (patch)
treef61f4b82c886c2432b89b36584e6e5b15f8d3bdf /library/alloc/src
parent94a7ea271f0996848f8fa03c61067620736b1242 (diff)
parent86b9f710d0c90068866e736bbbb7b89ac93ff2e6 (diff)
Auto merge of #75021 - cuviper:array_chunks_mut, r=scottmcm
Add `slice::array_chunks_mut`

This follows `array_chunks` from #74373 with a mutable version, `array_chunks_mut`. The implementation is identical apart from mutability. The new tests are adaptations of the `chunks_exact_mut` tests, plus an inference test like the one for `array_chunks`.

I reused the unstable feature `array_chunks` and tracking issue #74985, but I can separate that if desired.

r? `@withoutboats`
cc `@lcnr`
Diffstat (limited to 'library/alloc/src')
-rw-r--r--library/alloc/src/slice.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/library/alloc/src/slice.rs b/library/alloc/src/slice.rs
index 8ea2c6dc859..677bfdd2349 100644
--- a/library/alloc/src/slice.rs
+++ b/library/alloc/src/slice.rs
@@ -93,6 +93,8 @@ use crate::vec::Vec;
 
 #[unstable(feature = "array_chunks", issue = "74985")]
 pub use core::slice::ArrayChunks;
+#[unstable(feature = "array_chunks", issue = "74985")]
+pub use core::slice::ArrayChunksMut;
 #[stable(feature = "slice_get_slice", since = "1.28.0")]
 pub use core::slice::SliceIndex;
 #[stable(feature = "from_ref", since = "1.28.0")]