Open
Description
This is a tracking issue for the RFC "#3513" (rust-lang/rfcs#3513).
The feature gate for the issue is #![feature(gen_blocks)]
.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
- Implement the RFC (happening in Implement
gen
blocks in the 2024 edition #116447) - Lots of diagnostics work
- Make the
Iterator
s fused (so they keep returningNone
after the firstNone
instead of panicking (which is what they do now)) - implement
FusedIterator
- ImplementFusedIterator
forgen
block #122829 - Adjust documentation (see instructions on rustc-dev-guide)
- Formatting for new syntax has been added to the Style Guide (nightly-style-procedure)
- Stabilization PR (see instructions on rustc-dev-guide)
Unresolved Questions
- Whether to implement
Iterator
directly or, e.g.,IntoIterator
orIntoGenerator
. - Whether to do what is needed for self-referential
gen
blocks prior to stabilization. - Whether we should use some keyword other than
gen
. - Whether we should reserve
gen
as a full keyword or as a contextual one. - Whether we should opportunistically implement
size_hint
. - Whether we should implement other traits such as
DoubleEndedIterator
orExactSizeIterator
. - What to do about Rust 2015 and Rust 2018 where
k#gen
may or may not be workable.
Related issues
Implementation history
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Accepted RFC