-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Implement match ergonomics 2024 #122978
Implement match ergonomics 2024 #122978
Conversation
r? @Nadrieril rustbot has assigned @Nadrieril. Use |
This comment has been minimized.
This comment has been minimized.
c190214
to
7d341ef
Compare
This comment has been minimized.
This comment has been minimized.
7d341ef
to
9c78657
Compare
This comment has been minimized.
This comment has been minimized.
9c78657
to
2e69c71
Compare
Wow, thank you for taking over this! Let me know when you'd like me to have a look. |
@Nadrieril this should be ready for an initial review @rustbot label -S-waiting-on-author |
fee5782
to
52f4f99
Compare
☔ The latest upstream changes (presumably #122721) made this pull request unmergeable. Please resolve the merge conflicts. |
The original proposal allows reference patterns with "compatible" mutability, however it's not clear what that means so for now we require an exact match. I don't know the type system code well, so if something seems to not make sense it's probably because I made a mistake
Leads to bad results when combined with machine-applicable error fixes; not sure if that is considered acceptable. Again, I don't know what I am doing wrt type system stuff so needs more review there
52f4f99
to
ed6e6c9
Compare
This groups together multiple mostly unrelated changes. Could you split them into separate PRs? This will make review, discussion, FCPs, etc easier. |
@WaffleLapkin The changes are related, as the edition migration lint for the change to |
That seems fine?... Like, if everything is in the same PR, everything in it is blocked on everything else (in my expirience big PRs require exponentially-ish more time, multiple small PRs are almost always faster merged). Also, the edition migration is what's blocked (I think we can merge the implementation before the migration? seems fine as long as we don't forget to merge the migration later). |
Closing in favor of separate PRs. |
Implement changes to match ergonomics for the 2024 edition, as described in #105647, #64586, https://hackmd.io/YLKslGwpQOeAyGBayO9mdw.
mut ref
/mut ref mut
&
and&mut
patternsmut
with edition >= 2024Continuation of #120095. @Nadrieril
@rustbot label T-lang A-edition-2024 A-patterns