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

Suggest .as_ref() on borrow error involving Option/Result #84353

Merged
merged 1 commit into from
Apr 20, 2021

Conversation

estebank
Copy link
Contributor

When encountering a E0382 borrow error involving an Option or Result
provide a suggestion to use .as_ref() on the prior move location to
avoid the move.

Fix #84165.

When encountering a E0382 borrow error involving an `Option` or `Result`
provide a suggestion to use `.as_ref()` on the prior move location to
avoid the move.

Fix rust-lang#84165.
@rust-highfive
Copy link
Collaborator

r? @davidtwco

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 20, 2021
@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Apr 20, 2021

📌 Commit 2763a05 has been approved by davidtwco

@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-review Status: Awaiting review from the assignee but also interested parties. labels Apr 20, 2021
@bors
Copy link
Contributor

bors commented Apr 20, 2021

⌛ Testing commit 2763a05 with merge 6df26f8...

@bors
Copy link
Contributor

bors commented Apr 20, 2021

☀️ Test successful - checks-actions
Approved by: davidtwco
Pushing 6df26f8 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Apr 20, 2021
@bors bors merged commit 6df26f8 into rust-lang:master Apr 20, 2021
@rustbot rustbot added this to the 1.53.0 milestone Apr 20, 2021
@estebank estebank deleted the as-ref-mir branch November 9, 2023 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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.

Suggest .as_ref() on E0382 when possible
5 participants