Tracking Issue for `iter` macro
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
This is a tracking issue for the iter macro lang team experiment.
The feature gate for the issue is #![feature(iter_macro)].
Links to the discussion are in this #t-lang/gen topic, with more context starting here: https://github.com/rust-lang/rust/pull/137725#issuecomment-2702729792.
See also:
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. Discussion comments will get marked as off-topic or deleted. Repeated discussions on the tracking issue may lead to the tracking issue getting locked.
Steps
- Implement the macro
- Experiment with it in nightly
- Write an RFC: https://github.com/rust-lang/rfcs/pull/3861
Unresolved Questions
- Which syntaxes we support:
iter!(|| { ... })iter! { ... }
- Which traits the return value of each syntax implements:
IteratorIntoIteratorFn() -> impl Iterator
- https://github.com/rust-lang/rust/issues/153688
Implementation history
- #137725
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with RFC #3861, implementation PR #137725, and the related issue #153688, then review the unresolved syntax and return-trait questions listed here. Done means the design questions are resolved and the tracking checklist reflects the path toward stabilizing the iter macro.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100