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

Tweak "borrow closure argument" suggestion #106891

Merged
merged 1 commit into from
Jan 20, 2023
Merged

Conversation

estebank
Copy link
Contributor

Fix #45727.

@rustbot
Copy link
Collaborator

rustbot commented Jan 14, 2023

r? @petrochenkov

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 14, 2023
@petrochenkov petrochenkov 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 Jan 19, 2023
Comment on lines +21 to +24
help: do not borrow the argument
|
LL | foo(move |char| v);
| ~~~~
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not adding this incorrect suggestion, just changing its presentation, but we need to fix this in a follow up.

@estebank estebank added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Jan 19, 2023
@petrochenkov
Copy link
Contributor

r=me after squashing commits.
@rustbot author

@rustbot rustbot 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 Jan 19, 2023
@estebank
Copy link
Contributor Author

@bors r=petrochenkov

@bors
Copy link
Contributor

bors commented Jan 19, 2023

📌 Commit 33e11a3 has been approved by petrochenkov

It is now in the queue for this repository.

@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 Jan 19, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 20, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 20, 2023
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#106699 ([drop tracking] Visit break expressions )
 - rust-lang#106738 (Fix known-bug annotations)
 - rust-lang#106891 (Tweak "borrow closure argument" suggestion)
 - rust-lang#106928 (add raw identifier for keyword in suggestion)
 - rust-lang#107065 (Clippy: Make sure to include in beta: Move `unchecked_duration_subtraction` to pedantic)
 - rust-lang#107068 (autoderive Subdiagnostic for AddtoExternBlockSuggestion)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5f2ad80 into rust-lang:master Jan 20, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 20, 2023
@estebank estebank deleted the issue-45727 branch November 9, 2023 05:11
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. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

customize error message in the case where user supplies erroneous type annotation on closure argument
4 participants