-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #51275 - pnkfelix:nll-diagnostics-revise-check-access-p…
…ermissions, r=nikomatsakis NLL diagnostics: revise `fn check_access_permissions` NLL: revise `fn check_access_permissions` so that its (still branchy) shares more code paths between the different cases, and also provide more diagnostics in more cases (though the added diagnostics still do not always meet the quality bar established by AST-borrowck) ---- Transcribing "checklist" suggested by Niko, except I am rendering it as a table to make it clear that I do not regard every item in the list to be a "must have" for landing this PR. goal | does this PR do it? -----|------------------------------ no suggestions for `ref mut` | yes suggestions for direct local assignment (`{ let x = 3; x = 4; }`) | yes (see commits at end) suggestions for direct field assignment (`{ let x = (3, 4); x.0 = 5; }` | yes (see commits at end) suggestions for upvars (`let x = 3; let c = \|\| { &mut x; }`) | yes Note that I added support for a couple of rows via changes that are not strictly part of `fn check_access_permissions`. If desired I can remove those commits from this PR and leave them for a later PR. Fix #51031 Fix #51032 (bug #51191 needs a little more investigation before closing.) Fix #51578
- Loading branch information
Showing
58 changed files
with
670 additions
and
263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.