Skip to content

rustc's -W/A/D/F options should ignore clippy:: lints #69453

@jsgf

Description

@jsgf

In code, rustc will ignore:

#![allow(clippy::foo)]

But it fails with:

$ rustc --crate-type lib --emit metadata -Aclippy::foo t.rs
error[E0602]: unknown lint: `clippy::foo`
  |
  = note: requested on the command line with `-A clippy::foo`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0602`.

It should ignore unknown options consistent with directives in source code.
The current behaviour means that one can't share the same command line when invoking rustc vs clippy-driver.

Meta

rustc --version --verbose:

rustc 1.43.0-nightly (8aa9d2014 2020-02-21)
binary: rustc
commit-hash: 8aa9d2014f4e5258f83b907e8431c59a33acdae7
commit-date: 2020-02-21
host: x86_64-unknown-linux-gnu
release: 1.43.0-nightly
LLVM version: 9.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions