rust-lang / rust-lang/rust-clippy

Support `build.warnings`

Open
#16,963 4 comments 0 reactions 1 assignee View on GitHub

@raushan728 is already working on this.

Since May 26, 2026.

A-ui C-enhancement T-cargo
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.