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

[NLL] Mutability errors #52405

Merged
merged 4 commits into from
Jul 21, 2018
Merged

Conversation

matthewjasper
Copy link
Contributor

cc #51028
cc #51170
cc #46559
Closes #46629

  • Better explain why the place is immutable ("immutable item" is gone)
  • Distinguish &T and *const T
  • Use better spans when a mutable borrow is for a closure capture

r? @pnkfelix

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 15, 2018
@bors
Copy link
Contributor

bors commented Jul 17, 2018

☔ The latest upstream changes (presumably #52409) made this pull request unmergeable. Please resolve the merge conflicts.

@pnkfelix
Copy link
Member

This is great.

// option. This file may not be copied, modified, or distributed
// except according to those terms.

// All the possible mutability error cases.
Copy link
Member

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...

@pnkfelix
Copy link
Member

okay, r=me once you've resolved the merge conflict.

@pnkfelix pnkfelix added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 17, 2018
@matthewjasper
Copy link
Contributor Author

@pnkfelix done.

@pnkfelix
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Jul 19, 2018

📌 Commit fcfcb3e6012e1eb012009f531f92fca50c7bb645 has been approved by pnkfelix

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 19, 2018
@bors
Copy link
Contributor

bors commented Jul 19, 2018

☔ The latest upstream changes (presumably #52024) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jul 19, 2018
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
@nikomatsakis
Copy link
Contributor

@bors r=pnkfelix p=1 -- NLL is important, let's get this landed already :)

@bors
Copy link
Contributor

bors commented Jul 21, 2018

📌 Commit a06b243 has been approved by pnkfelix

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jul 21, 2018
@bors
Copy link
Contributor

bors commented Jul 21, 2018

⌛ Testing commit a06b243 with merge 942b384...

bors added a commit that referenced this pull request Jul 21, 2018
[NLL] Mutability errors

cc #51028
cc #51170
cc #46559
Closes #46629

* Better explain why the place is immutable ("immutable item" is gone)
* Distinguish &T and *const T
* Use better spans when a mutable borrow is for a closure capture

r? @pnkfelix
@bors
Copy link
Contributor

bors commented Jul 21, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: pnkfelix
Pushing 942b384 to master...

@bors bors merged commit a06b243 into rust-lang:master Jul 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants