-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
[NLL] Mutability errors #52405
[NLL] Mutability errors #52405
Conversation
☔ The latest upstream changes (presumably #52409) made this pull request unmergeable. Please resolve the merge conflicts. |
This is great. |
// option. This file may not be copied, modified, or distributed | ||
// except according to those terms. | ||
|
||
// All the possible mutability error cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I personally am a little overwhelmed by the number of cases covered in this file.
I originally wanted to suggest that you break it up into separate files. But I can see from reading the source itself that there is a specific pattern that you are maintaining in the source, and so there is value in keeping all these cases co-located...
okay, r=me once you've resolved the merge conflict. |
57f3d61
to
fcfcb3e
Compare
@pnkfelix done. |
@bors r+ |
📌 Commit fcfcb3e6012e1eb012009f531f92fca50c7bb645 has been approved by |
☔ The latest upstream changes (presumably #52024) made this pull request unmergeable. Please resolve the merge conflicts. |
Alway use unique instead of mutable borrows immutable upvars. Mark variables that are references for a match guard
* Better explain why the place is immutable * Distinguish &T and *const T * Use better spans when a mutable borrow is for a closure capture
fcfcb3e
to
a06b243
Compare
@bors r=pnkfelix p=1 -- NLL is important, let's get this landed already :) |
📌 Commit a06b243 has been approved by |
☀️ Test successful - status-appveyor, status-travis |
cc #51028
cc #51170
cc #46559
Closes #46629
r? @pnkfelix