Skip to content
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

Cannot pass arguments to clippy #14067

Open
SpekalsG3 opened this issue Jan 23, 2025 · 1 comment
Open

Cannot pass arguments to clippy #14067

SpekalsG3 opened this issue Jan 23, 2025 · 1 comment
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@SpekalsG3
Copy link

Summary

Error log with rust 1.81-aarch64-apple-darwin:

error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `/Users/spekalsg3/.rustup/toolchains/1.81-aarch64-apple-darwin/bin/clippy-driver /Users/spekalsg3/.rustup/toolchains/1.81-aarch64-apple-darwin/bin/rustc - --crate-name ___ --print=file-names --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: multiple input filenames provided (first two filenames are `-` and `feature="cargo-clippy"`)

Error log with rust 1.84.0-aarch64-apple-darwin (most recent stable at the moment):

    Checking repr v0.1.0 (/Users/spekalsg3/repr)
error: multiple input filenames provided (first two filenames are `src/main.rs` and `clippy`)

error: could not compile `repr` (bin "repr") due to 1 previous error

Reproducer

Steps to reproduce:

cargo new ./repr && cd repr
cargo clippy -- -D

Replace -D with any other argument (i.e. -W, -A, -D, -F).

Version

Both

rustc 1.84.0 (9fc6b4312 2025-01-07)
binary: rustc
commit-hash: 9fc6b43126469e3858e2fe86cafb4f0fd5068869
commit-date: 2025-01-07
host: aarch64-apple-darwin
release: 1.84.0
LLVM version: 19.1.5

rustc 1.81.0 (eeb90cda1 2024-09-04)
binary: rustc
commit-hash: eeb90cda1969383f56a2637cbd3037bdf598841c
commit-date: 2024-09-04
host: aarch64-apple-darwin
release: 1.81.0
LLVM version: 18.1.7

Additional Labels

No response

@SpekalsG3 SpekalsG3 added the C-bug Category: Clippy is not doing the correct thing label Jan 23, 2025
@samueltardieu
Copy link
Contributor

Note that -D takes an argument, for example cargo clippy -- -D clippy::pedantic

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