Closed
Description
Summary
running cargo build
followed by cargo clippy -- -Wall
will result subsequent calls to cargo clippy using the same cached failure message.
Reproducer
$ cd /tmp
$ mkdir bug-repro
$ cd bug-repro/
$ cargo init --lib
Creating library package
note: see more `Cargo.toml` keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
$ cargo build
Compiling bug-repro v0.1.0 (/tmp/bug-repro)
Finished `dev` profile [unoptimized + debuginfo] target(s) in 1.65s
$ cargo clippy -- -Wall
error: process didn't exit successfully: `/home/binarycat/.rustup/toolchains/nightly-2024-05-30-x86_64-unknown-linux-gnu/bin/clippy-driver /home/binarycat/.rustup/toolchains/nightly-2024-05-30-x86_64-unknown-linux-gnu/bin/rustc -vV` (exit status: 1)
--- stdout
The flag `-Wall` does not exist in `rustc`. Most useful lints are enabled by
default. Use `rustc -W help` to see all available lints. It's more common to put
warning settings in the crate root using `#![warn(LINT_NAME)]` instead of using
the command line flag directly.
$ cargo clippy -- -W clippy::all # can be the name of any lint, and the error will be the same as before
error: process didn't exit successfully: `/home/binarycat/.rustup/toolchains/nightly-2024-05-30-x86_64-unknown-linux-gnu/bin/clippy-driver /home/binarycat/.rustup/toolchains/nightly-2024-05-30-x86_64-unknown-linux-gnu/bin/rustc -vV` (exit status: 1)
--- stdout
The flag `-Wall` does not exist in `rustc`. Most useful lints are enabled by
default. Use `rustc -W help` to see all available lints. It's more common to put
warning settings in the crate root using `#![warn(LINT_NAME)]` instead of using
the command line flag directly.
Version
rustc 1.80.0-nightly (debd22da6 2024-05-29)
binary: rustc
commit-hash: debd22da66cfa97c74040ebf68e420672ac8560e
commit-date: 2024-05-29
host: x86_64-unknown-linux-gnu
release: 1.80.0-nightly
LLVM version: 18.1.6
Additional Labels
No response