library: Stabilize const_slice_first_last · qinheping/verify-rust-std@26013cd (original) (raw)

`@@ -172,7 +172,8 @@ impl [T] {

`

172

172

`/// assert_eq!(None, y.first_mut());

`

173

173

```` /// ```


`174`

`174`

`#[stable(feature = "rust1", since = "1.0.0")]

`

`175`

``

`-

#[rustc_const_unstable(feature = "const_slice_first_last", issue = "83570")]

`

``

`175`

`+

#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]

`

``

`176`

`+

#[rustc_const_stable(feature = "const_slice_first_last", since = "CURRENT_RUSTC_VERSION")]

`

`176`

`177`

`#[inline]

`

`177`

`178`

`#[must_use]

`

`178`

`179`

`pub const fn first_mut(&mut self) -> Option<&mut T> {

`

`@@ -214,7 +215,8 @@ impl<T> [T] {

`

`214`

`215`

`/// assert_eq!(x, &[3, 4, 5]);

`

`215`

`216`

```` /// ```

216

217

`#[stable(feature = "slice_splits", since = "1.5.0")]

`

217

``

`-

#[rustc_const_unstable(feature = "const_slice_first_last", issue = "83570")]

`

``

218

`+

#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]

`

``

219

`+

#[rustc_const_stable(feature = "const_slice_first_last", since = "CURRENT_RUSTC_VERSION")]

`

218

220

`#[inline]

`

219

221

`#[must_use]

`

220

222

`pub const fn split_first_mut(&mut self) -> Option<(&mut T, &mut [T])> {

`

`@@ -256,7 +258,8 @@ impl [T] {

`

256

258

`/// assert_eq!(x, &[4, 5, 3]);

`

257

259

```` /// ```


`258`

`260`

`#[stable(feature = "slice_splits", since = "1.5.0")]

`

`259`

``

`-

#[rustc_const_unstable(feature = "const_slice_first_last", issue = "83570")]

`

``

`261`

`+

#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]

`

``

`262`

`+

#[rustc_const_stable(feature = "const_slice_first_last", since = "CURRENT_RUSTC_VERSION")]

`

`260`

`263`

`#[inline]

`

`261`

`264`

`#[must_use]

`

`262`

`265`

`pub const fn split_last_mut(&mut self) -> Option<(&mut T, &mut [T])> {

`

`@@ -298,7 +301,8 @@ impl<T> [T] {

`

`298`

`301`

`/// assert_eq!(None, y.last_mut());

`

`299`

`302`

```` /// ```

300

303

`#[stable(feature = "rust1", since = "1.0.0")]

`

301

``

`-

#[rustc_const_unstable(feature = "const_slice_first_last", issue = "83570")]

`

``

304

`+

#[cfg_attr(bootstrap, rustc_allow_const_fn_unstable(const_mut_refs))]

`

``

305

`+

#[rustc_const_stable(feature = "const_slice_first_last", since = "CURRENT_RUSTC_VERSION")]

`

302

306

`#[inline]

`

303

307

`#[must_use]

`

304

308

`pub const fn last_mut(&mut self) -> Option<&mut T> {

`