Closed
Description
Feature gate: #![feature(const_intoiterator_identity)]
This is a tracking issue for the const IntoIterator
implementation for types that are already iterators.
This is not a new api; only constifying an existing one
Public API
// core::iter
// actually core/iter/traits/collect.rs, but re-exported from there.
impl<I: ~const Iterator> const IntoIterator for I {
type Item = I::Item;
type IntoIter = I;
fn into_iter(self) -> I;
}
Steps / History
- Implementation: Unstably constify
impl<I: Iterator> IntoIterator for I
#90602 - Final comment period (FCP)
- Stabilization PR
Unresolved Questions
- Should it bound on the resultant
Iterator
being aconst Iterator
or not? I've gone with having the bound for now. Note: This can be relaxed later without breaking any code.