Feature gate: #![feature(array_into_iter_constructors)]
This is a tracking issue for the from_raw_partsnew_unchecked and empty constructors on core::array::IntoIter.
This allows creating such an iterator with something other than a fully-initialized array.
Public API
// core::array
impl<T, const N: usize> IntoIter<T, N> {
pub const fn empty() -> Self;
pub const unsafe fn new_unchecked(buffer: [MaybeUninit<T>; N], initialized: Range<usize>) -> Self;
}
Steps / History
Unresolved Questions
Feature gate:
#![feature(array_into_iter_constructors)]This is a tracking issue for the
from_raw_partsnew_uncheckedandemptyconstructors oncore::array::IntoIter.This allows creating such an iterator with something other than a fully-initialized array.
Public API
Steps / History
array::IntoIter::{empty, from_raw_parts}#91341Unresolved Questions
from_raw_partsor something else?ArrayVec-like type (like howVechasfrom_raw_partsinstead ofvec::IntoIterhaving it), instead of making theIntoIterdirectly?new_unchecked? It was previouslyfrom_raw_parts, but was changed at reviewer request in the initial PR. Then after that,newwas deprecated, which makes me feel likenew_uncheckedis a bit odd too.Iterator::next_chunk#93700 (temporarily) added a duplicate of this calledwith_partial, so that's another possible name.new_uncheckedtakeR: RangeBounds? To allow this to work with the new range types.