Skip to content

Fix false positive on filter_next #7562

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

Merged
merged 2 commits into from
Aug 13, 2021

Conversation

dswij
Copy link
Member

@dswij dswij commented Aug 13, 2021

fixes #7561

changelog: Fix false positive on [filter_next] when a method does not implement Iterator

@rust-highfive
Copy link

r? @xFrednet

(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 Aug 13, 2021
@dswij
Copy link
Member Author

dswij commented Aug 13, 2021

Seems like the docs is still suggesting to use match_trait_method, which is both deprecated and is prone to false positive such as the one above.

I think it would be good if the docs explicitly explains why is_trait_method is not the preferred way.

@xFrednet
Copy link
Member

Oh, you're right. We should update that documentation, would you like to do that? 🙃

Diagnostic items in general are sadly not as good documented as they should. There is an issue for that in rust-lang/rustc-dev-guide#1188 to cover the entire topic. (I plan to work on it in the future when I have a bit more time again)

Copy link
Member

@xFrednet xFrednet left a comment

Choose a reason for hiding this comment

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

Looks good to me. Thank you for the fix! 🙃

@xFrednet
Copy link
Member

If you would like to do it, it would be good to do it in another PR to also get general feedback on the documentation update. Having it in this PR could let it fly under the radar.

@bors r+

@bors
Copy link
Contributor

bors commented Aug 13, 2021

📌 Commit 91b598a has been approved by xFrednet

@bors
Copy link
Contributor

bors commented Aug 13, 2021

⌛ Testing commit 91b598a with merge 7c5487d...

@bors
Copy link
Contributor

bors commented Aug 13, 2021

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: xFrednet
Pushing 7c5487d to master...

@bors bors merged commit 7c5487d into rust-lang:master Aug 13, 2021
@dswij dswij deleted the filter-next-false-positive branch August 13, 2021 10:33
bors added a commit that referenced this pull request Aug 26, 2021
Tweak common tool docs on type-implement-trait check

See #7562 (comment).

changelog: none
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.

filter_next false positive
4 participants