-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Running cargo check
after having run cargo clippy
reports clippy errors
#6253
Comments
Likewise, and more concerning, running |
This is probably #4612 Can you check if the behavior disappears if using |
ExampleSetup
fn main() {
let _ = 1.0 == 1.0;
} clippy, then check, then clippy$ cargo clippy
Checking clippy-issue-6253 v0.1.0 (/Users/user/clippy-issue-6253)
error: equal expressions as operands to `==`
--> src/main.rs:2:13
|
2 | let _ = 1.0 == 1.0;
| ^^^^^^^^^^
|
= 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: strict comparison of `f32` or `f64`
--> src/main.rs:2:13
|
2 | let _ = 1.0 == 1.0;
| ^^^^^^^^^^ help: consider comparing them within some error: `(1.0 - 1.0).abs() < error`
|
= note: `#[deny(clippy::float_cmp)]` on by default
= note: `f32::EPSILON` and `f64::EPSILON` are available for the `error`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#float_cmp
error: aborting due to 2 previous errors
error: could not compile `clippy-issue-6253`.
To learn more, run the command again with --verbose.
$ cargo check
Checking clippy-issue-6253 v0.1.0 (/Users/user/clippy-issue-6253)
Finished dev [unoptimized + debuginfo] target(s) in 0.08s
$ cargo clippy
Finished dev [unoptimized + debuginfo] target(s) in 0.00s check then clippyI ran $ cargo check
Checking clippy-issue-6253 v0.1.0 (/Users/user/clippy-issue-6253)
Finished dev [unoptimized + debuginfo] target(s) in 0.13s
$ cargo clippy
Finished dev [unoptimized + debuginfo] target(s) in 0.01s |
Yes, it's cargo issue that Clippy cannot fix. |
@ebroto Yes, it works as expected with that command. Do you know how long it will be until that's stable? |
This is rust-lang/cargo#8143. We're currently working towards stabilizing that. #6188 is one step forward, which I plan to finish after hacktoberfest is over and I can catch a break from reviewing :) |
I'm going to close this issue since it seems to be a duplicate. Thanks for your report anyway! |
cargo check
reports clippy errors and warnings after having runcargo clippy
.Steps to reproduce
cargo clippy
-- observe some errors and warningscargo check
-- observe the errors and warnings produced by clippy!Running
cargo clean
fixes this, but that's kind of unfortunate. I'm guessing this is related to #3837 re check and clippy sharing a build cache.Meta
cargo clippy -V
: clippy 0.0.212 (18bf6b4f0 2020-10-07)rustc -Vv
:The text was updated successfully, but these errors were encountered: