Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macro_rules should expose accessors for total iteration count and current iteration number #407

Closed
pnkfelix opened this issue Oct 23, 2014 · 4 comments
Labels
A-macros Macro related proposals and issues A-syntax Syntax related proposals & ideas postponed RFCs that have been postponed and may be revisited at a later time. T-lang Relevant to the language team, which will review and decide on the RFC.

Comments

@pnkfelix
Copy link
Member

macro_rules should expose accessors that map each Kleene-star/plus $(pat)<delim>* / $(pat)<delim>+ to a total iteration count and the current iteration number within the expansion template.

See RFC PR #88 for discussion, including on proposed syntax in the RFC itself, as well as much discussion about alternative syntaxes in the associated discussion.

@pnkfelix pnkfelix added the postponed RFCs that have been postponed and may be revisited at a later time. label Oct 23, 2014
@blaenk
Copy link
Contributor

blaenk commented Oct 24, 2014

This is great; the motivating example is very convincing.

@petrochenkov petrochenkov added the T-lang Relevant to the language team, which will review and decide on the RFC. label Jan 19, 2018
@Centril Centril added A-macros Macro related proposals and issues A-syntax Syntax related proposals & ideas labels Nov 27, 2018
@pnkfelix
Copy link
Member Author

The declarative macro repetition counts projects has taken ownership of this problem: rust-lang/lang-team#57 ; see their current work at #3086

@c410-f3r
Copy link

c410-f3r commented Mar 12, 2022

This issue can probably be closed now

@kennytm
Copy link
Member

kennytm commented Mar 13, 2022

closing as duplicate of #3086. see rust-lang/rust#83527 for the tracking issue.

@kennytm kennytm closed this as completed Mar 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-macros Macro related proposals and issues A-syntax Syntax related proposals & ideas postponed RFCs that have been postponed and may be revisited at a later time. T-lang Relevant to the language team, which will review and decide on the RFC.
Projects
None yet
Development

No branches or pull requests

6 participants