Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Rust 2024 match ergonomics reservations #1702

Merged
merged 1 commit into from
Dec 21, 2024

Conversation

traviscross
Copy link
Contributor

@traviscross traviscross commented Dec 20, 2024

We're adopting two changes to match ergonomics in Rust 2024 that have the effect of reserving language space:

  • Rule 1C: When the DBM is not move (whether or not behind a reference), writing mut, ref, or ref mut on a binding is an error.

  • Rule 2C: Reference patterns can only match against references in the scrutinee when the DBM is move.

Here, we document those changes in the Reference and describe the differences between editions.

cc @ehuss @Nadrieril @Jules-Bertholet

Tracking:

We're adopting two changes to match ergonomics in Rust 2024 that have
the effect of reserving language space:

- Rule 1C: When the DBM is not `move` (whether or not behind a
reference), writing `mut`, `ref`, or `ref mut` on a binding is an
error.

- Rule 2C: Reference patterns can only match against references in the
scrutinee when the DBM is `move`.

Here, we document those changes in the Reference and describe the
differences between editions.
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Dec 20, 2024
Copy link
Contributor

@ehuss ehuss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ehuss ehuss added this pull request to the merge queue Dec 21, 2024
Merged via the queue into master with commit 4dfaa4f Dec 21, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: The marked PR is awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants