-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
Feature gate: #![feature(const_iter)]
This is a tracking issue for const
Iterator
impls and related const fn
s.
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
- Implementation: implement const iterator using
rustc_do_not_const_check
#106541Final comment period (FCP)Stabilization PRTo pick up a draggable item, press the space bar. While dragging, use the arrow keys to move the item. Press space again to drop the item in its new position, or press escape to cancel.
Unresolved Questions
- None yet.
Esper89, CathalMullan, onestacked, hcsch, TernaryM01 and 9 more
Metadata
Metadata
Assignees
Labels
C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-const_trait_impl`#![feature(const_trait_impl)]``#![feature(const_trait_impl)]`T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Projects
Milestone
Relationships
Development
Select code repository
Activity
Expyron commentedon Jan 5, 2022
Does this issue also track
const
implementations ofslice
andstr
iterators and their related functions or would that be a separate tracking issue?For example:
core::slice::Iter
andslice.iter()
core::str::Chars
andstr.chars()
fee1-dead commentedon Jan 5, 2022
@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 commentedon Aug 31, 2022
Any updates on this?
fee1-dead commentedon Sep 2, 2022
@TiagoCavalcante: implementation has been stalled for more compiler related work to make this as easy to maintain as possible.
ImUrX commentedon Dec 2, 2022
@fee1-dead could you update the linked PR to the new one?
rinarakaki commentedon Sep 11, 2024
Is this affected by #110393?