Closed
Description
This is a tracking issue for reserving space in match ergonomics in Rust 2024 for RFC 3627 and other proposals for the future of match ergonomics.
Rules
- Rule 1C: When the DBM (default binding mode) is not
move
(whether or not behind a reference), writingmut
,ref
, orref mut
on a binding is an error. - Rule 2C: Reference patterns can only match against references in the scrutinee when the DBM is
move
.
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 w/migration lints.
- Match ergonomics 2024: implement mutable by-reference bindings #123080
- Match ergonomics 2024: Implement eat-one-layer #123512
- Match ergonomics 2024: let
&
patterns eat&mut
#124567 - Match ergonomics 2024:
mut
doesn't reset binding mode #123535 - Match ergonomics 2024: migration lint #124639
- Pattern Migration 2024: try to suggest eliding redundant binding modifiers #136577
- Stabilize in Rust 2024.
- Add documentation to the reference.
- Add documentation to the edition guide.
- Update the
reference
field of therust_2024_incompatible_pat
lint definition to point to the edition guide. - Ensure ready for Rust 2024 stabilization.
Tracking for broader RFC 3627 work:
Metadata
Metadata
Assignees
Labels
Area: The 2024 editionRelating to patterns and pattern matchingBlocker: 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.