about summary refs log tree commit diff
path: root/library/core/src/array/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-07-04 04:21:14 +0000
committerbors <bors@rust-lang.org>2025-07-04 04:21:14 +0000
commitc96a69059ecc618b519da385a6ccd03155aa0237 (patch)
tree8a658b79c06f3b54d15b22c22fa7b30edd889557 /library/core/src/array/mod.rs
parent837c5dd7de03aa97190593aef4e70d53e1bb574b (diff)
parente4e26d2acb13f42badb6e4953c7d72a001e3aed7 (diff)
downloadrust-c96a69059ecc618b519da385a6ccd03155aa0237.tar.gz
rust-c96a69059ecc618b519da385a6ccd03155aa0237.zip
Auto merge of #143407 - jhpratt:rollup-ekkoubw, r=jhpratt
Rollup of 11 pull requests

Successful merges:

 - rust-lang/rust#142749 (Add methods for converting bool to `Result<(), E>`)
 - rust-lang/rust#143288 (Fix `x clean` with a fifo)
 - rust-lang/rust#143307 (Fast path nitpicks)
 - rust-lang/rust#143346 (update coherence example)
 - rust-lang/rust#143356 (use unsigned_abs instead of `abs` on signed int to silence clippy)
 - rust-lang/rust#143370 (remove redundant #[must_use])
 - rust-lang/rust#143378 (simplify receivers for some array method calls)
 - rust-lang/rust#143380 (Replace kw_span by full span for generic const parameters.)
 - rust-lang/rust#143381 (rustdoc: don't treat methods under const impls or traits as const)
 - rust-lang/rust#143394 (compiler: Document and reduce `fn provide`s in hir crates)
 - rust-lang/rust#143395 (Always use the pure Rust fallback instead of `llvm.{maximum,minimum}`)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'library/core/src/array/mod.rs')
-rw-r--r--library/core/src/array/mod.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/library/core/src/array/mod.rs b/library/core/src/array/mod.rs
index 5a46c04527b..16356f749c9 100644
--- a/library/core/src/array/mod.rs
+++ b/library/core/src/array/mod.rs
@@ -707,7 +707,7 @@ impl<T, const N: usize> [T; N] {
     )]
     #[inline]
     pub fn split_array_ref<const M: usize>(&self) -> (&[T; M], &[T]) {
-        (&self[..]).split_first_chunk::<M>().unwrap()
+        self.split_first_chunk::<M>().unwrap()
     }
 
     /// Divides one mutable array reference into two at an index.
@@ -740,7 +740,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_first_chunk_mut::<M>().unwrap()
+        self.split_first_chunk_mut::<M>().unwrap()
     }
 
     /// Divides one array reference into two at an index from the end.
@@ -785,7 +785,7 @@ impl<T, const N: usize> [T; N] {
     )]
     #[inline]
     pub fn rsplit_array_ref<const M: usize>(&self) -> (&[T], &[T; M]) {
-        (&self[..]).split_last_chunk::<M>().unwrap()
+        self.split_last_chunk::<M>().unwrap()
     }
 
     /// Divides one mutable array reference into two at an index from the end.
@@ -818,7 +818,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[..]).split_last_chunk_mut::<M>().unwrap()
+        self.split_last_chunk_mut::<M>().unwrap()
     }
 }