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

Make suggestion to change Fn to FnMut work with methods as well #126226

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

gurry
Copy link
Contributor

@gurry gurry commented Jun 10, 2024

Fixes #125325

The issue occurred because the code that emitted the suggestion to change Fn to FnMut worked only for function calls and not method calls. This PR makes it work with methods as well.

@rustbot
Copy link
Collaborator

rustbot commented Jun 10, 2024

r? @Nadrieril

rustbot has assigned @Nadrieril.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@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 Jun 10, 2024
@gurry gurry changed the title Make suggestion to change Fn to FnMut work with methods well Make suggestion to change Fn to FnMut work with methods as well Jun 11, 2024
@Nadrieril
Copy link
Member

r? compiler

@rustbot rustbot assigned oli-obk and unassigned Nadrieril Jun 13, 2024
@oli-obk
Copy link
Contributor

oli-obk commented Jun 17, 2024

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 17, 2024

📌 Commit e47ea38 has been approved by oli-obk

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-review Status: Awaiting review from the assignee but also interested parties. labels Jun 17, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 17, 2024
…llaumeGomez

Rollup of 3 pull requests

Successful merges:

 - rust-lang#126226 (Make suggestion to change `Fn` to `FnMut` work with methods as well)
 - rust-lang#126570 (Convert a `span_bug` to a `span_delayed_bug`.)
 - rust-lang#126580 (Add `run-make/const_fn_mir` missing test annotation)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9f5e2e3 into rust-lang:master Jun 17, 2024
6 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jun 17, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jun 17, 2024
Rollup merge of rust-lang#126226 - gurry:125325-improve-closure-arg-sugg, r=oli-obk

Make suggestion to change `Fn` to `FnMut` work with methods as well

Fixes rust-lang#125325

The issue occurred because the code that emitted the suggestion to change `Fn` to `FnMut` worked only for function calls  and not method calls. This PR makes it work with methods as well.
@gurry gurry deleted the 125325-improve-closure-arg-sugg branch June 18, 2024 02:50
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.

" change this to return FnMut instead of Fn" where the return type is a std::result::Result
5 participants