Skip to content

Check rust lints when an unknown lint is detected #11855

Closed as not planned
Closed as not planned
@alice-i-cecile

Description

@alice-i-cecile

Description

Suppose we have a lint section that looks like this:

[lints.clippy]
missing_docs = "warn"

Then, clippy will emit:

warning[E0602]: unknown lint: `clippy::missing_docs`
  |
  = help: did you mean: `clippy::erasing_op`
  = note: requested on the command line with `-W clippy::missing_docs`
  = note: `#[warn(unknown_lints)]` on by default

Instead, clippy could check the lints provided by Rust, and provide a more helpful suggestion: that the lint is actually a Rust lint.

Version

rustc 1.74.0 (79e9716c9 2023-11-13)
binary: rustc
commit-hash: 79e9716c980570bfd1f666e3b16ac583f0168962
commit-date: 2023-11-13
host: x86_64-unknown-linux-gnu
release: 1.74.0
LLVM version: 17.0.4

Additional Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions