diff options
| author | bors <bors@rust-lang.org> | 2024-01-20 02:58:08 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-01-20 02:58:08 +0000 |
| commit | 128148d4cf742c3056e9bfc65e7cc9531cb0f815 (patch) | |
| tree | 0eedeffb6a188f3dd18f99d070ba66e814779213 /library/core/src/array | |
| parent | 0547c41f906760ce117a55ca690820b44d8e7eef (diff) | |
| parent | ee126973b0075060d9d95e401533181c5e8c5864 (diff) | |
| download | rust-128148d4cf742c3056e9bfc65e7cc9531cb0f815.tar.gz rust-128148d4cf742c3056e9bfc65e7cc9531cb0f815.zip | |
Auto merge of #120136 - matthiaskrgr:rollup-3zzb0z9, r=matthiaskrgr
Rollup of 9 pull requests Successful merges: - #117561 (Stabilize `slice_first_last_chunk`) - #117662 ([rustdoc] Allows links in headings) - #119815 (Format sources into the error message when loading codegen backends) - #119835 (Exhaustiveness: simplify empty pattern logic) - #119984 (Change return type of unstable `Waker::noop()` from `Waker` to `&Waker`.) - #120009 (never_patterns: typecheck never patterns) - #120122 (Don't add needs-triage to A-diagnostics) - #120126 (Suggest `.swap()` when encountering conflicting borrows from `mem::swap` on a slice) - #120134 (Restrict access to the private field of newtype indexes) Failed merges: - #119968 (Remove unused/unnecessary features) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'library/core/src/array')
| -rw-r--r-- | library/core/src/array/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs index 34213637a32..9d95b32409c 100644 --- a/library/core/src/array/mod.rs +++ b/library/core/src/array/mod.rs @@ -647,7 +647,7 @@ impl<T, const N: usize> [T; N] { )] #[inline] pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T]) { - (&self[..]).split_array_ref::<M>() + (&self[..]).split_first_chunk::<M>().unwrap() } /// Divides one mutable array reference into two at an index. @@ -680,7 +680,7 @@ impl<T, const N: usize> [T; N] { )] #[inline] pub fn split_array_mut<const M: usize>(&mut self) -> (&mut [T; M], &mut [T]) { - (&mut self[..]).split_array_mut::<M>() + (&mut self[..]).split_first_chunk_mut::<M>().unwrap() } /// Divides one array reference into two at an index from the end. @@ -725,7 +725,7 @@ impl<T, const N: usize> [T; N] { )] #[inline] pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M]) { - (&self[..]).rsplit_array_ref::<M>() + (&self[..]).split_last_chunk::<M>().unwrap() } /// Divides one mutable array reference into two at an index from the end. @@ -758,7 +758,7 @@ impl<T, const N: usize> [T; N] { )] #[inline] pub fn rsplit_array_mut<const M: usize>(&mut self) -> (&mut [T], &mut [T; M]) { - (&mut self[..]).rsplit_array_mut::<M>() + (&mut self[..]).split_last_chunk_mut::<M>().unwrap() } } |
