Skip to content

cargo clippy: Provides confusing help on wrong usage #11676

Open
@Jujumba

Description

@Jujumba

Summary

When passing an unexpected argument to cliippy, the "Usage" section of the output is wrong

$ cargo clippy ? 
error: unexpected argument '?' found

Usage: cargo check [OPTIONS]  # Should be `Usage: cargo clippy [OPTIONS]` I guess

For more information, try '--help'.

Reproducer

  1. Open up a terminal
  2. Execute cargo clippy
  3. See the misconfusing help

Version

rustc 1.73.0 (cc66ad468 2023-10-03)
binary: rustc
commit-hash: cc66ad468955717ab92600c770da8c1601a4ff33
commit-date: 2023-10-03
host: x86_64-pc-windows-msvc
release: 1.73.0
LLVM version: 17.0.2


cargo 1.73.0 (9c4383fb5 2023-08-26)
release: 1.73.0
commit-hash: 9c4383fb55986096b414d98125421ab87b5fd642
commit-date: 2023-08-26
host: x86_64-pc-windows-msvc
libgit2: 1.6.4 (sys:0.17.2 vendored)
libcurl: 8.2.1-DEV (sys:0.4.65+curl-8.2.1 vendored ssl:Schannel)
os: Windows 10.0.25967 (Windows 11 Core) [64-bit]

Additional Labels

No response

Metadata

Metadata

Assignees

Labels

C-bugCategory: Clippy is not doing the correct thing

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions