Repository navigation
Tracking Issue for RFC 3086: macro metavariable expressions #83527
Copy link
Copy link
Open
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.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-macro_metavar_expr`#![feature(macro_metavar_expr)]``#![feature(macro_metavar_expr)]`S-tracking-design-concernsStatus: There are blocking design concerns.Status: There are blocking design concerns.S-tracking-needs-summaryStatus: It's hard to tell what's been done and what hasn't! Someone should do some investigation.Status: It's hard to tell what's been done and what hasn't! Someone should do some investigation.T-langRelevant to the language teamRelevant to the language team
Description
This is a tracking issue for the RFC "3086" (rust-lang/rfcs#3086).
The feature gate for the issue is #![feature(macro_metavar_expr)].
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 (cc @markbt -- has there been work done here already?)
- Adjust documentation (see instructions on rustc-dev-guide)
- Stabilization PR (see instructions on rustc-dev-guide)
Unresolved questions and bugs
Implementation history
- 2022-02-25, [1/2] Implement macro meta-variable expressions
- 2022-03-11, [2/2] Implement macro meta-variable expressions
- 2022-03-12, Fix remaining meta-variable expression TODOs
- 2019-03-21, [macro-metavar-expr] Fix generated tokens hygiene
- 2022-04-07, Kickstart the inner usage of macro_metavar_expr
- 2022-04-07, [macro_metavar_expr] Add tests to ensure the feature requirement
- 2023-05-24, [RFC-3086] Restrict the parsing of
count - 2023-10-22, [RFC 3086] Attempt to try to resolve blocking concerns
Reacted by Wren [Undefined], Lokathor, Ruby Lazuli, Ivan Tham, Valentin Kharin, Sparrow Li (LiYuan), Eric Zhao, T6, Teoh Han Hui, Caio and 74 more
Reacted by Felix S.
Reacted by Mara Bos, Ruby Lazuli, T6, Rune Tynan, Petr Portnov | PROgrm_JARvis, Sylv, Vladislav Sukhmel, David, jasper310899, dzmitry-lahoda and 4 more
Reacted by Ltrlg
Reacted by studyingegret
Metadata
Metadata
Assignees
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)B-RFC-approvedBlocker: Approved by a merged RFC but not yet implemented.Blocker: Approved by a merged RFC but not yet implemented.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-macro_metavar_expr`#![feature(macro_metavar_expr)]``#![feature(macro_metavar_expr)]`S-tracking-design-concernsStatus: There are blocking design concerns.Status: There are blocking design concerns.S-tracking-needs-summaryStatus: It's hard to tell what's been done and what hasn't! Someone should do some investigation.Status: It's hard to tell what's been done and what hasn't! Someone should do some investigation.T-langRelevant to the language teamRelevant to the language team
Activity
markbt commentedon Mar 27, 2021
There is a working prototype on the
markbt/rust/metavariable_expressionsbranch. This needs feature gating, and there are a couple of TODOs to resolve, but it's otherwise in reasonable shape. I'm planning to work on it over the coming weeks.markbt commentedon Apr 7, 2021
Update (2021-04-07)
I've not yet started work on productionizing the prototype on the
markbt/rust/metavariable_expressionsbranch. I plan to start later this month, free time permitting.Remove enum_dispatch dependency
markbt commentedon May 9, 2021
Update (2021-05-09)
I still haven't started on this yet as some stuff came up last month that prevented from having the time to work on it. It's still in my plan to work on it, and hopefully I'll have some time soon.
markbt commentedon Jun 29, 2021
Update (2021-06-29)
Still no progress, as I haven't had any spare time to work on this project. I'm still planning to work on it, and hopefully will get some time soon.
joshtriplett commentedon Jul 7, 2021
@markbt If you don't expect to find the bandwidth in the near future, would you potentially be interested in seeking help in the form of another owner for this initiative? If you're still interested in driving this, that's fine, but if you'd like us to switch gears from pinging you to broadcasting that the project could use help, we'd be happy to do that.
markbt commentedon Jul 9, 2021
I'd be happy with any help if there's someone available. I still plan to work on it, but personal stuff is getting in the way at the moment. Sorry about that.
To recap: I have a working prototype on my branch at https://github.com/markbt/rust/tree/metavariable_expressions . The next steps are to rebase that onto the latest master, and then polish it up so that it's ready for inclusion. Then there's also the doc work to make sure the new feature is documented well. Help with any of this would be appreciated.
c410-f3r commentedon Jan 29, 2022
@markbt Are you still working on this feature? If not, then I can pick up from where you stopped
markbt commentedon Jan 29, 2022
c410-f3r commentedon Jan 30, 2022
Thank you @markbt
I will take a look at the branch and then get in touch if any questions arise
Rollup merge of rust-lang#94884 - c410-f3r:meta-take-2, r=petrochenkov
62 remaining items
Fix tracking issue number for feature(macro_attr)
Fix tracking issue number for feature(macro_attr)
Fix tracking issue number for feature(macro_attr)
Rollup merge of rust-lang#147066 - SimonSapin:macro_attr-tracking, r=lqd
Rollup merge of rust-lang#147066 - SimonSapin:macro_attr-tracking, r=lqd
Unrolled build for #147066
mwlon commentedon Nov 15, 2025
Are there any recent updates to this? I would love to see it stabilized.
jhpratt commentedon Nov 15, 2025
@mwlon Someone needs to summarize the status and what's being stabilized. I previously volunteered for this, but I've been busy for so long I've not had the time to do so.
mwlon commentedon Nov 15, 2025
@jhpratt Do you know how involved that might be? Wondering if it's something a potential first-time contributor like me could hope to accomplish in a day or two.
jhpratt commentedon Dec 1, 2025
@mwlon I would think it's doable! It would primarily be going thru this tracking issue, the RFC, and associated issues to determine what is being stabilized, why certain decisions were made, and essentially provide a high-level overview to the unfamiliar.
If you have questions, joining Zulip is probably the best bet to get quick answers.
cosmicexplorer commentedon Jan 14, 2026
Which zulip channel?
jhpratt commentedon Jan 15, 2026
T-lang would be most likely to get you helpful info, with WG-macros being a close second (though that's not very active).
Auto merge of #117050 - c410-f3r:here-we-go-again, r=petrochenkov