Open
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
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
markbt commentedon Mar 27, 2021
There is a working prototype on the
markbt/rust/metavariable_expressions
branch. 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_expressions
branch. 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.
styled_components
futursolo/stylist-rs#4881 remaining items
count
,ignore
,index
, andlen
(macro_metavar_expr
) #122808c410-f3r commentedon Mar 21, 2024
A stabilization attempt is available at #122808
Auto merge of #117050 - c410-f3r:here-we-go-again, r=petrochenkov
macro_metavar_expr_concat
#124225Auto merge of #117050 - c410-f3r:here-we-go-again, r=petrochenkov
remove impl_opcode macro since repeation in metavariable expr is unst…
&&str
#128759safinaskar commentedon Oct 13, 2024
🚀 I found a way to evaluate
concat_idents
(andconcat
and few other built-in macros) before evaluating other macro, which takesconcat_idents
as an argument! I. e. I found a way to evaluatea!(concat_idents!(...))
such way, thatconcat_idents
evaluates beforea
. Answer is crate https://crates.io/crates/with_builtin_macros !!! Thanks, @danielhenrymantilla ! In other words,with_builtin_macros
ispaste
, but not only forconcat_idents
, but also forconcat
and some other macros.Note:
#[feature(macro_metavar_expr_concat)]
is not complete solution (see below).And in other words,
with_builtin_macros
allows one to achieve eager evaluation of macros in limited way.Also,
with_builtin_macros
allows one to useconcat_idents
when defining new identifier.Also, https://crates.io/crates/with_builtin_macros allows one to use
concat_idents
in stable Rust.remove reliance on a trait solver inference bug (#18840)
remove reliance on a trait solver inference bug (#18840)
remove reliance on a trait solver inference bug (bevyengine#18840)