@@ -4531,8 +4531,6 @@ impl<T, const N: usize> [[T; N]] {
45314531 /// # Examples
45324532 ///
45334533 /// ```
4534- /// #![feature(slice_flatten)]
4535- ///
45364534 /// assert_eq!([[1, 2, 3], [4, 5, 6]].as_flattened(), &[1, 2, 3, 4, 5, 6]);
45374535 ///
45384536 /// assert_eq!(
@@ -4546,7 +4544,8 @@ impl<T, const N: usize> [[T; N]] {
45464544 /// let empty_slice_of_arrays: &[[u32; 10]] = &[];
45474545 /// assert!(empty_slice_of_arrays.as_flattened().is_empty());
45484546 /// ```
4549- #[ unstable( feature = "slice_flatten" , issue = "95629" ) ]
4547+ #[ stable( feature = "slice_flatten" , since = "CURRENT_RUSTC_VERSION" ) ]
4548+ #[ rustc_const_unstable( feature = "const_slice_flatten" , issue = "95629" ) ]
45504549 pub const fn as_flattened ( & self ) -> & [ T ] {
45514550 let len = if T :: IS_ZST {
45524551 self . len ( ) . checked_mul ( N ) . expect ( "slice len overflow" )
@@ -4572,8 +4571,6 @@ impl<T, const N: usize> [[T; N]] {
45724571 /// # Examples
45734572 ///
45744573 /// ```
4575- /// #![feature(slice_flatten)]
4576- ///
45774574 /// fn add_5_to_all(slice: &mut [i32]) {
45784575 /// for i in slice {
45794576 /// *i += 5;
@@ -4584,7 +4581,7 @@ impl<T, const N: usize> [[T; N]] {
45844581 /// add_5_to_all(array.as_flattened_mut());
45854582 /// assert_eq!(array, [[6, 7, 8], [9, 10, 11], [12, 13, 14]]);
45864583 /// ```
4587- #[ unstable ( feature = "slice_flatten" , issue = "95629 " ) ]
4584+ #[ stable ( feature = "slice_flatten" , since = "CURRENT_RUSTC_VERSION " ) ]
45884585 pub fn as_flattened_mut ( & mut self ) -> & mut [ T ] {
45894586 let len = if T :: IS_ZST {
45904587 self . len ( ) . checked_mul ( N ) . expect ( "slice len overflow" )
0 commit comments