Skip to content

cannot forbid dead_code since lint triggers for third party macros #126028

Open
@andrewbanchich

Description

@andrewbanchich

if i, for example, forbid dead_code, clippy produces

error[E0453]: allow(dead_code) incompatible with previous forbid
  |
  | #[derive(Parser, Debug, Clone)]
  |          ^^^^^^ overruled by previous forbid
  |
  = note: `forbid` lint level was set on command line
  = note: this error originates in the derive macro `Parser` (in Nightly builds, run with -Z macro-backtrace for more info)

this is coming from clap's Parser derive macro, which i have no control over, so prevents me from forbidding dead_code in my own crate.

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions