Skip to content

cached rustc failure with -W all #12940

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

Closed
lolbinarycat opened this issue Jun 16, 2024 · 1 comment
Closed

cached rustc failure with -W all #12940

lolbinarycat opened this issue Jun 16, 2024 · 1 comment
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@lolbinarycat
Copy link

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

@lolbinarycat lolbinarycat added the C-bug Category: Clippy is not doing the correct thing label Jun 16, 2024
@Alexendoo
Copy link
Member

Fixed by #13468

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

No branches or pull requests

2 participants