-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
Description
Problem
Newly created crates with cargo new
fail clippy with default settings on stable.
New crates created from a template should not generate warnings.
Steps
$ cargo new --lib clippy-test
Created library `clippy-test` package
$ cd clippy-test/
/Users/lopopolo/dev/artichoke/clippy-test
$ cargo clippy --all-features --all-targets
Checking clippy-test v0.1.0 (/Users/lopopolo/dev/artichoke/clippy-test)
error: identical args used in this `assert_eq!` macro call
--> src/lib.rs:5:20
|
5 | assert_eq!(2 + 2, 4);
| ^^^^^^^^
|
= note: `#[deny(clippy::eq_op)]` on by default
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#eq_op
error: aborting due to previous error
error: could not compile `clippy-test`
To learn more, run the command again with --verbose.
Possible Solution(s)
Update the built in new crate template or suppress the clippy warning.
Notes
Output of cargo version
:
cargo 1.54.0 (5ae8d74b3 2021-06-22)