Some borrowck diagnostic fixes#98603
Merged
bors merged 2 commits intorust-lang:masterfrom Jun 29, 2022
Merged
Conversation
Contributor
|
r? @davidtwco (rust-highfive has picked a reviewer for you, use r? to override) |
davidtwco
approved these changes
Jun 28, 2022
Member
davidtwco
left a comment
There was a problem hiding this comment.
LGTM, one very minor nit, r=me w/ or w/out fixing
Member
There was a problem hiding this comment.
nit:
Suggested change
| //and suggesting to change `as_ref` to `as_mut` in the second. | |
| // and suggesting to change `as_ref` to `as_mut` in the second. |
8fb6ad3 to
8fd7356
Compare
Contributor
Author
|
@bors r=davidtwco |
Contributor
Author
|
@bors ping |
Collaborator
|
😪 I'm awake I'm awake |
Contributor
Author
|
@bors r=davidtwco |
Collaborator
|
📌 Commit 8fd7356 has been approved by |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jun 29, 2022
Rollup of 7 pull requests Successful merges: - rust-lang#97423 (Simplify memory ordering intrinsics) - rust-lang#97542 (Use typed indices in argument mismatch algorithm) - rust-lang#97786 (Account for `-Z simulate-remapped-rust-src-base` when resolving remapped paths) - rust-lang#98277 (Fix trait object reborrow suggestion) - rust-lang#98525 (Add regression test for rust-lang#79224) - rust-lang#98549 (interpret: do not prune requires_caller_location stack frames quite so early) - rust-lang#98603 (Some borrowck diagnostic fixes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
.as_refsuggestion logic from borrowck, this has the consequence of also not suggesting.as_refafterOptionmethods, but (correctly) before.This is somewhat incomplete. See
src/test/ui/borrowck/suggest-as-ref-on-mut-closure.rsfor more improvements.