Skip to content

Tracking Issue for const Iterator impls and related const fns #92476

@fee1-dead

Description

@fee1-dead
Member

Feature gate: #![feature(const_iter)]

This is a tracking issue for const Iterator impls and related const fns.

Public API

// core::iter
impl<I: ~const Iterator + ?Sized> const Iterator for &mut I;
impl<I: Iterator> const IntoIterator for I;
impl<B, I: ~const Iterator, F> const Iterator for Map<I, F>
where
    F: ~const FnMut(I::Item) -> B + ~const Drop;

// core::option
impl<T> Option<T> {
    pub const fn iter_mut(&mut self) -> IterMut<'_, T>;
}

impl<T> const IntoIterator for Option<T>;
impl<'a, T> const IntoIterator for &'a Option<T>;
impl<'a, T> const IntoIterator for &'a mut Option<T>;
impl<'a, A> const Iterator for Iter<'a, A>;
impl<'a, A> const Iterator for IterMut<'a, A>;
impl<A> const Iterator for IntoIter<A>;

Steps / History

Unresolved Questions

  • None yet.

Activity

added
T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFC
on Jan 1, 2022
Expyron

Expyron commented on Jan 5, 2022

@Expyron
Contributor

Does this issue also track const implementations of slice and str iterators and their related functions or would that be a separate tracking issue?

For example:

  • core::slice::Iter and slice.iter()
  • core::str::Chars and str.chars()
fee1-dead

fee1-dead commented on Jan 5, 2022

@fee1-dead
MemberAuthor

@Expyron: those implementations have not been added yet. My plan is to land the smallest possible PR that simply makes it possible to work, and constify others in much smaller, finer grained PRs. Further work should use this tracking issue if related.

TiagoCavalcante

TiagoCavalcante commented on Aug 31, 2022

@TiagoCavalcante

Any updates on this?

fee1-dead

fee1-dead commented on Sep 2, 2022

@fee1-dead
MemberAuthor

@TiagoCavalcante: implementation has been stalled for more compiler related work to make this as easy to maintain as possible.

ImUrX

ImUrX commented on Dec 2, 2022

@ImUrX

@fee1-dead could you update the linked PR to the new one?

rinarakaki

rinarakaki commented on Sep 11, 2024

@rinarakaki

Is this affected by #110393?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCF-const_trait_impl`#![feature(const_trait_impl)]`T-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

        Participants

        @ImUrX@Expyron@rinarakaki@fee1-dead@TiagoCavalcante

        Issue actions

          Tracking Issue for `const` `Iterator` impls and related `const fn`s · Issue #92476 · rust-lang/rust