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

fix while_let_on_iterator suggestion in a closure #7262

Merged
merged 1 commit into from
Jun 8, 2021

Conversation

Jarcho
Copy link
Contributor

@Jarcho Jarcho commented May 21, 2021

fixes: #7249

A future improvement would be to check if the closure is being used as FnOnce, in which case the original suggestion would be correct.

changelog: Suggest &mut iter inside a closure for while_let_on_iterator

@rust-highfive
Copy link

r? @phansch

(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 May 21, 2021
@xFrednet
Copy link
Member

xFrednet commented Jun 6, 2021

Hey @flip1995, I've reviewed this PR before and now have gone over it a second time. I think it can be merged as it is. Could you maybe double-check it? 🙃

r? @flip1995

@flip1995
Copy link
Member

flip1995 commented Jun 8, 2021

@bors r+

Thanks! And thanks for the review @xFrednet

@bors
Copy link
Collaborator

bors commented Jun 8, 2021

📌 Commit 7db0e4f has been approved by flip1995

@bors
Copy link
Collaborator

bors commented Jun 8, 2021

⌛ Testing commit 7db0e4f with merge b740020...

bors added a commit that referenced this pull request Jun 8, 2021
fix `while_let_on_iterator` suggestion in a closure

fixes: #7249

A future improvement would be to check if the closure is being used as `FnOnce`, in which case the original suggestion would be correct.

changelog: Suggest `&mut iter` inside a closure for `while_let_on_iterator`
@flip1995
Copy link
Member

flip1995 commented Jun 8, 2021

@bors r=xFrednet,flip1995

@bors
Copy link
Collaborator

bors commented Jun 8, 2021

💡 This pull request was already approved, no need to approve it again.

  • This pull request is currently being tested. If there's no response from the continuous integration service, you may use retry to trigger a build again.

@bors
Copy link
Collaborator

bors commented Jun 8, 2021

📌 Commit 7db0e4f has been approved by xFrednet,flip1995

@bors
Copy link
Collaborator

bors commented Jun 8, 2021

⌛ Testing commit 7db0e4f with merge 07217e3...

@bors
Copy link
Collaborator

bors commented Jun 8, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet,flip1995
Pushing 07217e3 to master...

@bors bors merged commit 07217e3 into rust-lang:master Jun 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

while_let_on_iterator suggests broken fix when iterator is captured in FnMut
6 participants