Skip to content

Commit

Permalink
Stabilize const_slice_split_at_mut
Browse files Browse the repository at this point in the history
  • Loading branch information
onestacked committed Sep 7, 2024
1 parent 9afe713 commit 734f16b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion library/core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@
#![feature(const_slice_from_raw_parts_mut)]
#![feature(const_slice_from_ref)]
#![feature(const_slice_index)]
#![feature(const_slice_split_at_mut)]
#![feature(const_str_from_utf8_unchecked_mut)]
#![feature(const_strict_overflow_ops)]
#![feature(const_swap)]
Expand Down
6 changes: 3 additions & 3 deletions library/core/src/slice/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1899,7 +1899,7 @@ impl<T> [T] {
#[inline]
#[track_caller]
#[must_use]
#[rustc_const_unstable(feature = "const_slice_split_at_mut", issue = "101804")]
#[rustc_const_stable(feature = "const_slice_split_at_mut", since = "CURRENT_RUSTC_VERSION")]
pub const fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]) {
match self.split_at_mut_checked(mid) {
Some(pair) => pair,
Expand Down Expand Up @@ -2001,7 +2001,7 @@ impl<T> [T] {
/// assert_eq!(v, [1, 2, 3, 4, 5, 6]);
/// ```
#[stable(feature = "slice_split_at_unchecked", since = "1.79.0")]
#[rustc_const_unstable(feature = "const_slice_split_at_mut", issue = "101804")]
#[rustc_const_stable(feature = "const_slice_split_at_mut", since = "CURRENT_RUSTC_VERSION")]
#[inline]
#[must_use]
pub const unsafe fn split_at_mut_unchecked(&mut self, mid: usize) -> (&mut [T], &mut [T]) {
Expand Down Expand Up @@ -2101,7 +2101,7 @@ impl<T> [T] {
/// assert_eq!(None, v.split_at_mut_checked(7));
/// ```
#[stable(feature = "split_at_checked", since = "1.80.0")]
#[rustc_const_unstable(feature = "const_slice_split_at_mut", issue = "101804")]
#[rustc_const_stable(feature = "const_slice_split_at_mut", since = "CURRENT_RUSTC_VERSION")]
#[inline]
#[must_use]
pub const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut [T], &mut [T])> {
Expand Down

0 comments on commit 734f16b

Please sign in to comment.