diff --git a/core/src/slice/mod.rs b/core/src/slice/mod.rs index 33a468a6b..d4981af90 100644 --- a/core/src/slice/mod.rs +++ b/core/src/slice/mod.rs @@ -4257,7 +4257,7 @@ impl [[T; N]] { /// assert!(empty_slice_of_arrays.flatten().is_empty()); /// ``` #[unstable(feature = "slice_flatten", issue = "95629")] - pub fn flatten(&self) -> &[T] { + pub const fn flatten(&self) -> &[T] { let len = if T::IS_ZST { self.len().checked_mul(N).expect("slice len overflow") } else {