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

No lint with cfg! and fix sugg for macro in needless_bool lint #6211

Merged
merged 1 commit into from
Oct 25, 2020

Conversation

ThibsG
Copy link
Contributor

@ThibsG ThibsG commented Oct 24, 2020

Don't lint if cfg! macro is one of the operand.
Fix suggestion when the span originated from a macro, using hir_with_macro_callsite.

Fixes: #3973

changelog: none

@rust-highfive
Copy link

r? @flip1995

(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 Oct 24, 2020
@flip1995
Copy link
Member

@bors r+

Thanks!

@bors
Copy link
Collaborator

bors commented Oct 25, 2020

📌 Commit 62f60e1 has been approved by flip1995

@bors
Copy link
Collaborator

bors commented Oct 25, 2020

⌛ Testing commit 62f60e1 with merge 718bb28...

@bors
Copy link
Collaborator

bors commented Oct 25, 2020

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: flip1995
Pushing 718bb28 to master...

@bors bors merged commit 718bb28 into rust-lang:master Oct 25, 2020
@ThibsG ThibsG deleted the NeedlessBoolCfg branch October 25, 2020 12:00
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.

needless_bool triggers on cfg! comparisons
4 participants