about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2025-07-03 23:39:31 +0800
committerDeadbeef <ent3rm4n@gmail.com>2025-07-03 23:39:58 +0800
commit3c56c2ecf53b8bbaa863c32c9e93ef2d3b102e28 (patch)
treeb3c336955a7bf59cc7628ea56f2f3c778cd03028
parent9e64506923cb0f18c2bb2b934edecff525774acc (diff)
downloadrust-3c56c2ecf53b8bbaa863c32c9e93ef2d3b102e28.tar.gz
rust-3c56c2ecf53b8bbaa863c32c9e93ef2d3b102e28.zip
stabilize `const_slice_reverse`
-rw-r--r--library/core/src/slice/mod.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/library/core/src/slice/mod.rs b/library/core/src/slice/mod.rs
index 3a3f44c6b85..35bebdbe522 100644
--- a/library/core/src/slice/mod.rs
+++ b/library/core/src/slice/mod.rs
@@ -967,7 +967,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;
@@ -1000,6 +1000,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);