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

Ignore macros with ! operators in eq_op #5079

Merged
merged 1 commit into from
Jan 22, 2020
Merged

Conversation

JohnTitor
Copy link
Member

@JohnTitor JohnTitor commented Jan 22, 2020

SpanlessEq::eq_expr doesn't ignore macros with ! operators and I'm not sure we should ignore there, so I ignore in eq_op (and op_ref).

Fixes #5077

changelog: Fix false positive in eq_op

@flip1995
Copy link
Member

I think this issue not only exists for !macro!(..), but also for just macro!(..). So cfg!(feature = "a") == cfg!(feature = "b") still gets linted. Can you add a test for this case?

@JohnTitor
Copy link
Member Author

I think this issue not only exists for !macro!(..), but also for just macro!(..). So cfg!(feature = "a") == cfg!(feature = "b") still gets linted.

Uhm, I cannot reproduce it: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=b385ae2aeab61bd9ee50ca74204209ff
I may be wrong so could you provide an example via playground?

@flip1995
Copy link
Member

I may be wrong so could you provide an example via playground?

Nope, seems this is already handled. All good then.

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 22, 2020

📌 Commit a7d58ed has been approved by flip1995

@bors
Copy link
Collaborator

bors commented Jan 22, 2020

⌛ Testing commit a7d58ed with merge eff3bc5...

bors added a commit that referenced this pull request Jan 22, 2020
Ignore macros with `!` operators in `eq_op`

`SpanlessEq::eq_expr` doesn't ignore macros with `!` operators and I'm not sure we should ignore there, so I ignore in `eq_op` (and `op_ref`).

Fixes #5077

changelog: Fix false positive in `eq_op`
@bors
Copy link
Collaborator

bors commented Jan 22, 2020

☀️ Test successful - checks-travis, status-appveyor
Approved by: flip1995
Pushing eff3bc5 to master...

@bors bors merged commit a7d58ed into rust-lang:master Jan 22, 2020
@JohnTitor JohnTitor deleted the fix-eq-op branch January 22, 2020 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FP: eq_op: fires for different cfg!() args
3 participants