Skip to content

Commit 942cb77

Browse files
authored
Unrolled build for #143382
Rollup merge of #143382 - fee1-dead-contrib:push-trrymlzqmmoz, r=jhpratt stabilize `const_slice_reverse` cc #135120, needs FCP.
2 parents ebd8557 + 3c56c2e commit 942cb77

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
@@ -971,7 +971,7 @@ impl<T> [T] {
971971
/// assert!(v == [3, 2, 1]);
972972
/// ```
973973
#[stable(feature = "rust1", since = "1.0.0")]
974-
#[rustc_const_unstable(feature = "const_slice_reverse", issue = "135120")]
974+
#[rustc_const_stable(feature = "const_slice_reverse", since = "CURRENT_RUSTC_VERSION")]
975975
#[inline]
976976
pub const fn reverse(&mut self) {
977977
let half_len = self.len() / 2;
@@ -1004,6 +1004,7 @@ impl<T> [T] {
10041004
// this check tells LLVM that the indexing below is
10051005
// in-bounds. Then after inlining -- once the actual
10061006
// lengths of the slices are known -- it's removed.
1007+
// FIXME(const_trait_impl) replace with let (a, b) = (&mut a[..n], &mut b[..n]);
10071008
let (a, _) = a.split_at_mut(n);
10081009
let (b, _) = b.split_at_mut(n);
10091010

0 commit comments

Comments
 (0)