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
Unresolved Questions
- Should it bound on the resultant
Iterator being a const Iterator or not? I've gone with having the bound for now. Note: This can be relaxed later without breaking any code.
Feature gate:
#![feature(const_intoiterator_identity)]This is a tracking issue for the
const IntoIteratorimplementation for types that are already iterators.This is not a new api; only constifying an existing one
Public API
Steps / History
impl<I: Iterator> IntoIterator for I#90602Unresolved Questions
Iteratorbeing aconst Iteratoror not? I've gone with having the bound for now. Note: This can be relaxed later without breaking any code.