@@ -4533,21 +4533,21 @@ impl<T, const N: usize> [[T; N]] {
45334533 /// ```
45344534 /// #![feature(slice_flatten)]
45354535 ///
4536- /// assert_eq!([[1, 2, 3], [4, 5, 6]].flatten (), &[1, 2, 3, 4, 5, 6]);
4536+ /// assert_eq!([[1, 2, 3], [4, 5, 6]].as_flattened (), &[1, 2, 3, 4, 5, 6]);
45374537 ///
45384538 /// assert_eq!(
4539- /// [[1, 2, 3], [4, 5, 6]].flatten (),
4540- /// [[1, 2], [3, 4], [5, 6]].flatten (),
4539+ /// [[1, 2, 3], [4, 5, 6]].as_flattened (),
4540+ /// [[1, 2], [3, 4], [5, 6]].as_flattened (),
45414541 /// );
45424542 ///
45434543 /// let slice_of_empty_arrays: &[[i32; 0]] = &[[], [], [], [], []];
4544- /// assert!(slice_of_empty_arrays.flatten ().is_empty());
4544+ /// assert!(slice_of_empty_arrays.as_flattened ().is_empty());
45454545 ///
45464546 /// let empty_slice_of_arrays: &[[u32; 10]] = &[];
4547- /// assert!(empty_slice_of_arrays.flatten ().is_empty());
4547+ /// assert!(empty_slice_of_arrays.as_flattened ().is_empty());
45484548 /// ```
45494549 #[ unstable( feature = "slice_flatten" , issue = "95629" ) ]
4550- pub const fn flatten ( & self ) -> & [ T ] {
4550+ pub const fn as_flattened ( & self ) -> & [ T ] {
45514551 let len = if T :: IS_ZST {
45524552 self . len ( ) . checked_mul ( N ) . expect ( "slice len overflow" )
45534553 } else {
@@ -4581,11 +4581,11 @@ impl<T, const N: usize> [[T; N]] {
45814581 /// }
45824582 ///
45834583 /// let mut array = [[1, 2, 3], [4, 5, 6], [7, 8, 9]];
4584- /// add_5_to_all(array.flatten_mut ());
4584+ /// add_5_to_all(array.as_flattened_mut ());
45854585 /// assert_eq!(array, [[6, 7, 8], [9, 10, 11], [12, 13, 14]]);
45864586 /// ```
45874587 #[ unstable( feature = "slice_flatten" , issue = "95629" ) ]
4588- pub fn flatten_mut ( & mut self ) -> & mut [ T ] {
4588+ pub fn as_flattened_mut ( & mut self ) -> & mut [ T ] {
45894589 let len = if T :: IS_ZST {
45904590 self . len ( ) . checked_mul ( N ) . expect ( "slice len overflow" )
45914591 } else {
0 commit comments