Auto merge of #125574 - matthiaskrgr:rollup-1oljoup, r=matthiaskrgr · model-checking/verify-rust-std@d14171d (original) (raw)
`@@ -4531,8 +4531,6 @@ impl<T, const N: usize> [[T; N]] {
`
4531
4531
`/// # Examples
`
4532
4532
`///
`
4533
4533
```` /// ```
`4534`
``
`-
/// #![feature(slice_flatten)]
`
`4535`
``
`-
///
`
`4536`
`4534`
`/// assert_eq!([[1, 2, 3], [4, 5, 6]].as_flattened(), &[1, 2, 3, 4, 5, 6]);
`
`4537`
`4535`
`///
`
`4538`
`4536`
`/// assert_eq!(
`
`@@ -4546,7 +4544,8 @@ impl<T, const N: usize> [[T; N]] {
`
`4546`
`4544`
`/// let empty_slice_of_arrays: &[[u32; 10]] = &[];
`
`4547`
`4545`
`/// assert!(empty_slice_of_arrays.as_flattened().is_empty());
`
`4548`
`4546`
```` /// ```
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")]
`
4550
4549
`pub const fn as_flattened(&self) -> &[T] {
`
4551
4550
`let len = if T::IS_ZST {
`
4552
4551
`self.len().checked_mul(N).expect("slice len overflow")
`
`@@ -4572,8 +4571,6 @@ impl<T, const N: usize> [[T; N]] {
`
4572
4571
`/// # Examples
`
4573
4572
`///
`
4574
4573
```` /// ```
`4575`
``
`-
/// #![feature(slice_flatten)]
`
`4576`
``
`-
///
`
`4577`
`4574`
`/// fn add_5_to_all(slice: &mut [i32]) {
`
`4578`
`4575`
`/// for i in slice {
`
`4579`
`4576`
`/// *i += 5;
`
`@@ -4584,7 +4581,7 @@ impl<T, const N: usize> [[T; N]] {
`
`4584`
`4581`
`/// add_5_to_all(array.as_flattened_mut());
`
`4585`
`4582`
`/// assert_eq!(array, [[6, 7, 8], [9, 10, 11], [12, 13, 14]]);
`
`4586`
`4583`
```` /// ```
4587
``
`-
#[unstable(feature = "slice_flatten", issue = "95629")]
`
``
4584
`+
#[stable(feature = "slice_flatten", since = "CURRENT_RUSTC_VERSION")]
`
4588
4585
`pub fn as_flattened_mut(&mut self) -> &mut [T] {
`
4589
4586
`let len = if T::IS_ZST {
`
4590
4587
`self.len().checked_mul(N).expect("slice len overflow")
`