Stabilize const_slice_split_at_mut
and const_slice_first_last_chunk
· qinheping/verify-rust-std@b3da4ed (original) (raw)
`@@ -356,7 +356,8 @@ impl [T] {
`
356
356
```` /// ```
`357`
`357`
`#[inline]
`
`358`
`358`
`#[stable(feature = "slice_first_last_chunk", since = "1.77.0")]
`
`359`
``
`-
#[rustc_const_unstable(feature = "const_slice_first_last_chunk", issue = "111774")]
`
``
`359`
`+
#[rustc_const_stable(feature = "const_slice_first_last_chunk", since = "CURRENT_RUSTC_VERSION")]
`
``
`360`
`+
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
`
`360`
`361`
`pub const fn first_chunk_mut<const N: usize>(&mut self) -> Option<&mut [T; N]> {
`
`361`
`362`
`if self.len() < N {
`
`362`
`363`
`None
`
`@@ -421,7 +422,8 @@ impl<T> [T] {
`
`421`
`422`
```` /// ```
422
423
`#[inline]
`
423
424
`#[stable(feature = "slice_first_last_chunk", since = "1.77.0")]
`
424
``
`-
#[rustc_const_unstable(feature = "const_slice_first_last_chunk", issue = "111774")]
`
``
425
`+
#[rustc_const_stable(feature = "const_slice_first_last_chunk", since = "CURRENT_RUSTC_VERSION")]
`
``
426
`+
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
`
425
427
`pub const fn split_first_chunk_mut(
`
426
428
`&mut self,
`
427
429
`) -> Option<(&mut [T; N], &mut [T])> {
`
`@@ -491,7 +493,8 @@ impl [T] {
`
491
493
```` /// ```
`492`
`494`
`#[inline]
`
`493`
`495`
`#[stable(feature = "slice_first_last_chunk", since = "1.77.0")]
`
`494`
``
`-
#[rustc_const_unstable(feature = "const_slice_first_last_chunk", issue = "111774")]
`
``
`496`
`+
#[rustc_const_stable(feature = "const_slice_first_last_chunk", since = "CURRENT_RUSTC_VERSION")]
`
``
`497`
`+
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
`
`495`
`498`
`pub const fn split_last_chunk_mut<const N: usize>(
`
`496`
`499`
`&mut self,
`
`497`
`500`
`) -> Option<(&mut [T], &mut [T; N])> {
`
`@@ -560,7 +563,8 @@ impl<T> [T] {
`
`560`
`563`
```` /// ```
561
564
`#[inline]
`
562
565
`#[stable(feature = "slice_first_last_chunk", since = "1.77.0")]
`
563
``
`-
#[rustc_const_unstable(feature = "const_slice_first_last_chunk", issue = "111774")]
`
``
566
`+
#[rustc_const_stable(feature = "const_slice_first_last_chunk", since = "CURRENT_RUSTC_VERSION")]
`
``
567
`+
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
`
564
568
`pub const fn last_chunk_mut(&mut self) -> Option<&mut [T; N]> {
`
565
569
`if self.len() < N {
`
566
570
`None
`
`@@ -1903,7 +1907,8 @@ impl [T] {
`
1903
1907
`#[inline]
`
1904
1908
`#[track_caller]
`
1905
1909
`#[must_use]
`
1906
``
`-
#[rustc_const_unstable(feature = "const_slice_split_at_mut", issue = "101804")]
`
``
1910
`+
#[rustc_const_stable(feature = "const_slice_split_at_mut", since = "CURRENT_RUSTC_VERSION")]
`
``
1911
`+
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
`
1907
1912
`pub const fn split_at_mut(&mut self, mid: usize) -> (&mut [T], &mut [T]) {
`
1908
1913
`match self.split_at_mut_checked(mid) {
`
1909
1914
`Some(pair) => pair,
`
`@@ -2005,7 +2010,8 @@ impl [T] {
`
2005
2010
`/// assert_eq!(v, [1, 2, 3, 4, 5, 6]);
`
2006
2011
```` /// ```
`2007`
`2012`
`#[stable(feature = "slice_split_at_unchecked", since = "1.79.0")]
`
`2008`
``
`-
#[rustc_const_unstable(feature = "const_slice_split_at_mut", issue = "101804")]
`
``
`2013`
`+
#[rustc_const_stable(feature = "const_slice_split_at_mut", since = "CURRENT_RUSTC_VERSION")]
`
``
`2014`
`+
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
`
`2009`
`2015`
`#[inline]
`
`2010`
`2016`
`#[must_use]
`
`2011`
`2017`
`pub const unsafe fn split_at_mut_unchecked(&mut self, mid: usize) -> (&mut [T], &mut [T]) {
`
`@@ -2105,7 +2111,8 @@ impl<T> [T] {
`
`2105`
`2111`
`/// assert_eq!(None, v.split_at_mut_checked(7));
`
`2106`
`2112`
```` /// ```
2107
2113
`#[stable(feature = "split_at_checked", since = "1.80.0")]
`
2108
``
`-
#[rustc_const_unstable(feature = "const_slice_split_at_mut", issue = "101804")]
`
``
2114
`+
#[rustc_const_stable(feature = "const_slice_split_at_mut", since = "CURRENT_RUSTC_VERSION")]
`
``
2115
`+
#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]
`
2109
2116
`#[inline]
`
2110
2117
`#[must_use]
`
2111
2118
`pub const fn split_at_mut_checked(&mut self, mid: usize) -> Option<(&mut [T], &mut [T])> {
`