Skip to content

Support build.warnings #16963

@kpreid

Description

@kpreid

Cargo has stabilized the build.warnings configuration option. When used as build.warnings = "deny", this causes build, check, etc. to exit with an error status if any warnings are emitted, without changing those warnings to errors individually, and without changing the value of RUSTFLAGS.

For consistency with cargo check, cargo clippy should support the same behavior. That is,

cargo --config='build.warnings="deny"' clippy

should exit with a nonzero exit code if there are any warnings. Currently (clippy 0.1.97 (ad3a598ca4 2026-05-03)), it exits successfully.


@rustbot label +A-ui +C-enhancement +T-cargo

Metadata

Metadata

Assignees

Labels

A-uiArea: Clippy interface, usage and configurationC-enhancementCategory: Enhancement of lints, like adding more cases or adding help messagesT-cargoType: cargo related

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions