Skip to content

Tracking Issue for const_intoiterator_identity #90603

Closed
@mbartlett21

Description

@mbartlett21

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions