-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thing
Description
Summary
I'm pretty sure it's not supposed to do that...
Btw, I've seen similar behavior to other tools (rustc, rust-analyzer), but managed to make a small reproducer only for clippy.
Reproducer
Type all of those
cargo new --lib demo && cd demo
cargo clippy
mkdir .cargo
cat >> .cargo/config.toml << __EOF__
[target.'cfg(target_arch="x86_64")']
rustflags = "-Ctarget-feature=+fma,+avx2"
__EOF__
cargo clippy -- -W clippy::all -p demo
cargo clippy
Final call to clippy fails with no options
% cargo clippy
error: failed to run `rustc` to learn about target-specific information
Caused by:
process didn't exit successfully: `/home/pacak/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/clippy-driver /home/pacak/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/bin/rustc - --crate-name ___ --print=file-names -C link-arg=-fuse-ld=mold -C target-feature=+fma,+avx2 -Ctarget-feature=+fma,+avx2 --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
--- stderr
error: Unrecognized option: 'p'
Version
rustc 1.77.1 (7cf61ebde 2024-03-27)
binary: rustc
commit-hash: 7cf61ebde7b22796c69757901dd346d0fe70bd97
commit-date: 2024-03-27
host: x86_64-unknown-linux-gnu
release: 1.77.1
LLVM version: 17.0.6
Or nightly as of today
Additional Labels
No response
richardhuaaa, tylerlaprade and xzfcAlexendoo
Metadata
Metadata
Assignees
Labels
C-bugCategory: Clippy is not doing the correct thingCategory: Clippy is not doing the correct thing