Running cargo clippy
after cargo new
fails with eq_op
#6635
Labels
C-bug
Category: Clippy is not doing the correct thing
E-medium
Call for participation: Medium difficulty level problem and requires some initial experience.
I-false-positive
Issue: The lint was triggered on code it shouldn't have
T-macros
Type: Issues with macros and macro expansion
(Issue originally mentioned here)
Running
cargo clippy
directly aftercargo new
fails. This is maybe just my opinion, but it seems a little unfortunate that the default project template doesn't pass the linter.It fails on
assert_eq!(2 + 2, 4)
. I'm pretty sure that used to be fine. I would expect clippy to flagassert_eq!(4, 4)
, but notassert_eq!(2 + 2, 4)
.Lint name: eq_op
I tried this code:
(This is the default `src/lib.rs`, for reference)
I expected to see this happen:
no errors
Instead, this happened:
Meta
The text was updated successfully, but these errors were encountered: