These methods stabilized in #125561 for rust 1.80 🎉
This issue is now tracking their const-stability.
Feature gate: #![feature(slice_flatten)]
This is a tracking issue for the methods flatten and flatten_mut on [[T; N]], and into_flattened on Vec<[T; N], A>.
Public API
// core::slice
impl<T, const N: usize> [[T; N]] {
pub fn as_flattened(&self) -> &[T];
pub fn as_flattened_mut(&mut self) -> &mut [T];
}
// alloc::vec
impl<T, A: Allocator, const N: usize> Vec<[T; N], A> {
pub fn into_flattened(self) -> Vec<T, A>;
}
Steps / History
Unresolved Questions
Are these the best possible names?
These methods stabilized in #125561 for rust 1.80 🎉
This issue is now tracking their const-stability.
Feature gate:
#![feature(slice_flatten)]This is a tracking issue for the methods
flattenandflatten_muton[[T; N]], andinto_flattenedonVec<[T; N], A>.Public API
Steps / History
<[[T; N]]>::flatten{_mut}#95579flatten(_mut)→as_flattened(_mut)#125171slice_flatten#125561<[T]>::as_flattenedconstUnresolved Questions
Are these the best possible names?