Tracking Issue for match ergonomics 2024 (RFC 3627)
@Jules-Bertholet is already working on this.
Since Apr 17, 2024.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.2k
- PR merge metrics
- PR metrics pending
Description
This is a tracking issue for changes to match ergonomics for the 2024 edition, as described in https://github.com/rust-lang/rfcs/pull/3627.
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
-
mut ref/mut ref mut(#![feature(mut_ref)]) #123080- Bikeshed (
ref (mut/ref mut (mut?) - Update all pattern diagnostics to ensure they know about this
- Bikeshed (
- Changes to
&and&mutpatterns (#![feature(ref_pat_eat_one_layer_2024, ref_pat_eat_one_layer_2024_structural)]) #123512 - Allow
&patterns to consume&mutreferences https://github.com/rust-lang/rust/pull/124567 - Don't reset binding mode on
mutwith edition >= 2024 #123535- Edition migration lint (without rustfix)
- Rustfix #124639
- RFC https://github.com/rust-lang/rfcs/pull/3627
- Original design doc: https://hackmd.io/YLKslGwpQOeAyGBayO9mdw.
- N/A: Add documentation to the dev guide.
- See the instructions.
- Stabilize Rule 1C, Rule 2C for Rust 2024.
- Stabilize Rules 3-5 for all editions.
- Add documentation to the reference.
- See the instructions.
- Add documentation to the edition guide.
- Ensure ready for Rust 2024 stabilization.
Tracking for Rust 2024 changes:
Unresolved Questions
mut ref mutvsref mut (mutsyntax- The HackMD says the reference types should be "compatible", what does this mean and why?
### Implementation history
- [ ] https://github.com/rust-lang/rust/pull/122978
- [ ] https://github.com/rust-lang/rust/pull/123080
- [ ] https://github.com/rust-lang/rust/pull/123311
- [ ] https://github.com/rust-lang/rust/pull/123512
- [ ] https://github.com/rust-lang/rust/pull/123535
- [ ] https://github.com/rust-lang/rust/pull/124047
- [ ] https://github.com/rust-lang/rust/pull/124567
- [ ] https://github.com/rust-lang/rust/pull/124639
- [ ] https://github.com/rust-lang/rfcs/pull/3627
- [ ] https://github.com/rust-lang/rust/issues/125058
- [ ] https://github.com/rust-lang/rust/pull/125084
- [ ] https://github.com/rust-lang/rust/pull/125168
- [ ] https://github.com/rust-lang/rust/pull/127008
- [ ] https://github.com/rust-lang/rust/issues/127257
- [ ] https://github.com/rust-lang/rust/pull/127369
- [ ] https://github.com/rust-lang/rust/issues/127559
- [ ] https://github.com/rust-lang/rust/pull/135237
See also #105647, #64586
@rustbot label T-lang A-patterns A-edition-2024
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.