Tracking Issue for updating expr
macro fragment specifier for Rust 2024 #123742
Closed
Description
opened on Apr 10, 2024
This is a tracking issue for updating the expr
fragment specifier for Rust 2024 according to the policy described in RFC 3531:
The feature gate for the issue is #![feature(expr_fragment_specifier_2024)]
.
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 in nightly Rust 2024.
- Add test cases around nested macros spanning crates across different editions. For ideas, see this comment.
- Update
expr
to match_
. - Implement migration lints.
- Remove edition gating on
expr_2021
fragment specifier. - Stabilize new fragment specifier (
expr_2021
) in all editions. - N/A: Add documentation to the dev guide.
- See the instructions.
- Add documentation to the reference.
- Add documentation to the edition guide.
- Ensure ready for Rust 2024 stabilization.
Unresolved Questions
- Is there a reasonable semantically-appropriate name for
expr_2021
, or should we just call it that per the RFC?- Resolved, keeping
expr_2021
, see Tracking Issue for updatingexpr
macro fragment specifier for Rust 2024 #123742 (comment).
- Resolved, keeping
Related
- Add
expr202x
macro pattern #84364 - Non-terminals, e.g. expr, have diverged between parser and macro matcher #86730
- Update
expr
matcher for Edition 2024 and addexpr_2021
nonterminal #123865 - Avoid checking the edition as much as possible #125828
- Make edition dependent
:expr
macro fragment act like the edition-dependent:pat
fragment does #126700 - [RFC] mbe: consider the
_
in 2024 an expression #126697 - Make edition dependent
:expr
macro fragment act like the edition-dependent:pat
fragment does #126700
cc @rust-lang/wg-macros @eholk @vincenzopalazzo
Metadata
Assignees
Labels
Area: The 2024 editionArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Blocker: Approved by a merged RFC but not yet implemented.Category: An issue tracking the progress of sth. like the implementation of an RFCStatus: This issue is ready for inclusion in the edition.Relevant to the language team, which will review and decide on the PR/issue.
Activity