diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-07-18 19:14:44 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-18 19:14:44 +0200 |
| commit | 401aaf4ac164632759c5563fdbfe633d62908f4d (patch) | |
| tree | 1079cc21d3a019b110c3325acacb930c582296d2 | |
| parent | f38891e697e9b9efe3c232d25c20feb80bc248bc (diff) | |
| parent | 3c56c2ecf53b8bbaa863c32c9e93ef2d3b102e28 (diff) | |
| download | rust-401aaf4ac164632759c5563fdbfe633d62908f4d.tar.gz rust-401aaf4ac164632759c5563fdbfe633d62908f4d.zip | |
Rollup merge of #143382 - fee1-dead-contrib:push-trrymlzqmmoz, r=jhpratt
stabilize `const_slice_reverse` cc rust-lang/rust#135120, needs FCP.
| -rw-r--r-- | library/core/src/slice/mod.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs index 32419024db9..6fe5affc48b 100644 --- a/library/core/src/slice/mod.rs +++ b/library/core/src/slice/mod.rs @@ -971,7 +971,7 @@ impl<T> [T] { /// assert!(v == [3, 2, 1]); /// ``` #[stable(feature = "rust1", since = "1.0.0")] - #[rustc_const_unstable(feature = "const_slice_reverse", issue = "135120")] + #[rustc_const_stable(feature = "const_slice_reverse", since = "CURRENT_RUSTC_VERSION")] #[inline] pub const fn reverse(&mut self) { let half_len = self.len() / 2; @@ -1004,6 +1004,7 @@ impl<T> [T] { // this check tells LLVM that the indexing below is // in-bounds. Then after inlining -- once the actual // lengths of the slices are known -- it's removed. + // FIXME(const_trait_impl) replace with let (a, b) = (&mut a[..n], &mut b[..n]); let (a, _) = a.split_at_mut(n); let (b, _) = b.split_at_mut(n); |
