Skip to content

'cargo check' and 'cargo clippy' share message cache #8075

@Vlad-Shcherbina

Description

@Vlad-Shcherbina

Steps to reproduce

  1. Create a new project with the following content:
    fn main() {
        0;
    }
  2. Run
    cargo clean
    cargo check
    cargo clippy
    
  3. Run
    cargo clean
    cargo clippy
    cargo check
    

Expected result

Step 2 should produce the following output:

> cargo clean
> cargo check
    Checking zzz v0.1.0 (C:\temp\zzz)
    Finished dev [unoptimized + debuginfo] target(s) in 0.22s
> cargo clippy
    Checking zzz v0.1.0 (C:\temp\zzz)
warning: statement with no effect
 --> src\main.rs:2:5
  |
2 |     0;
  |     ^^
  |
  = note: `#[warn(clippy::no_effect)]` on by default
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect

    Finished dev [unoptimized + debuginfo] target(s) in 0.40s

Step 3 should produce the following output:

> cargo clean
> cargo clippy
    Checking zzz v0.1.0 (C:\temp\zzz)
warning: statement with no effect
 --> src\main.rs:2:5
  |
2 |     0;
  |     ^^
  |
  = note: `#[warn(clippy::no_effect)]` on by default
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect

    Finished dev [unoptimized + debuginfo] target(s) in 0.40s
> cargo check
    Checking zzz v0.1.0 (C:\temp\zzz)
    Finished dev [unoptimized + debuginfo] target(s) in 0.22s

Actual result

Step 2 produces the following output

> cargo clean
> cargo check
    Checking zzz v0.1.0 (C:\temp\zzz)
    Finished dev [unoptimized + debuginfo] target(s) in 0.22s
> cargo clippy
    Finished dev [unoptimized + debuginfo] target(s) in 0.06s

Step 3 produces the following output

> cargo clean
> cargo clippy
    Checking zzz v0.1.0 (C:\temp\zzz)
warning: statement with no effect
 --> src\main.rs:2:5
  |
2 |     0;
  |     ^^
  |
  = note: `#[warn(clippy::no_effect)]` on by default
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect

    Finished dev [unoptimized + debuginfo] target(s) in 0.40s
> cargo check
warning: statement with no effect
 --> src\main.rs:2:5
  |
2 |     0;
  |     ^^
  |
  = note: `#[warn(clippy::no_effect)]` on by default
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#no_effect

    Finished dev [unoptimized + debuginfo] target(s) in 0.09s

Version info

> cargo --version --verbose
cargo 1.44.0-nightly (6e07d2dfb 2020-03-31)
release: 1.44.0
commit-hash: 6e07d2dfb7fc87b1c9489de41da4dafa239daf03
commit-date: 2020-03-31

> cargo clippy --version
clippy 0.0.212 (23549a8c 2020-03-16)clippy 0.0.212 (7907abea 2020-04-03)

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions