- 
                Notifications
    
You must be signed in to change notification settings  - Fork 13.9k
 
Closed
Labels
A-edition-2024Area: The 2024 editionArea: The 2024 editionA-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 RFCS-tracking-ready-for-editionStatus: This issue is ready for inclusion in the edition.Status: This issue is ready for inclusion in the edition.T-langRelevant to the language teamRelevant to the language team
Description
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 
exprto match_. - Implement migration lints.
 -  Remove edition gating on 
expr_2021fragment 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 updatingexprmacro fragment specifier for Rust 2024 #123742 (comment). 
 - Resolved, keeping 
 
Related
- Add 
expr202xmacro pattern #84364 - Non-terminals, e.g. expr, have diverged between parser and macro matcher #86730
 - Update 
exprmatcher for Edition 2024 and addexpr_2021nonterminal #123865 - Avoid checking the edition as much as possible #125828
 - Make edition dependent 
:exprmacro fragment act like the edition-dependent:patfragment does #126700 - [RFC] mbe: consider the 
_in 2024 an expression #126697 - Make edition dependent 
:exprmacro fragment act like the edition-dependent:patfragment does #126700 
cc @rust-lang/wg-macros @eholk @vincenzopalazzo
vincenzopalazzo
Metadata
Metadata
Assignees
Labels
A-edition-2024Area: The 2024 editionArea: The 2024 editionA-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 RFCS-tracking-ready-for-editionStatus: This issue is ready for inclusion in the edition.Status: This issue is ready for inclusion in the edition.T-langRelevant to the language teamRelevant to the language team