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

New library crate created with cargo new fails clippy #9759

Closed
lopopolo opened this issue Aug 4, 2021 · 1 comment · Fixed by #9796
Closed

New library crate created with cargo new fails clippy #9759

lopopolo opened this issue Aug 4, 2021 · 1 comment · Fixed by #9796
Assignees
Labels

Comments

@lopopolo
Copy link

lopopolo commented Aug 4, 2021

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)
@lopopolo lopopolo added the C-bug Category: bug label Aug 4, 2021
@Rustin170506
Copy link
Member

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants