-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Closed
Description
I just got this false positive when running clippy over racer:
src/racer/cargo.rs:314:12: 314:30 warning: equal expressions as operands to &&, #[warn(eq_op)] on by default
src/racer/cargo.rs:314 if f.pop() && f.pop() {
^~~~~~~~~~~~~~~~~~
I think the eq_op lint should be reduced a lot. Equal expressions at the AST level are not guaranteed to have the same result, and of course may have side effects too.
The lint should only look for simple expressions like consts (using const eval), variable lookups, field access and maybe casts to primitive types. Even operator application can have side effects.
Metadata
Metadata
Assignees
Labels
No labels