Skip to content

Commit 3c56c2e

Browse files
committed
stabilize const_slice_reverse
1 parent 9e64506 commit 3c56c2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

library/core/src/slice/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ impl<T> [T] {
967967
/// assert!(v == [3, 2, 1]);
968968
/// ```
969969
#[stable(feature = "rust1", since = "1.0.0")]
970-
#[rustc_const_unstable(feature = "const_slice_reverse", issue = "135120")]
970+
#[rustc_const_stable(feature = "const_slice_reverse", since = "CURRENT_RUSTC_VERSION")]
971971
#[inline]
972972
pub const fn reverse(&mut self) {
973973
let half_len = self.len() / 2;
@@ -1000,6 +1000,7 @@ impl<T> [T] {
10001000
// this check tells LLVM that the indexing below is
10011001
// in-bounds. Then after inlining -- once the actual
10021002
// lengths of the slices are known -- it's removed.
1003+
// FIXME(const_trait_impl) replace with let (a, b) = (&mut a[..n], &mut b[..n]);
10031004
let (a, _) = a.split_at_mut(n);
10041005
let (b, _) = b.split_at_mut(n);
10051006

0 commit comments

Comments
 (0)