-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Description
Problem
There are cases when it's not desirable configuring the lint levels using Cargo.toml
and RUST(DOC)FLAGS
is not discoverable and also has the footgun that RUSTFLAGS
!= RUSTDOCFLAGS
. Specifically it's useful to have things like #![warn(missing_docs)]
in the lib.rs
but deny the warning in the CI because it's annoying to have to document everything if one is just designing the API and manually editing the file (potentially accidentally committing it) is also annoying. Editing Cargo.toml
from CI's shell script is fragile.
Proposed Solution
It'd be best to just expose the lint levels from cargo
and make sure cargo
sets them correctly for rustc and rustdoc. Also please don't forget forbid because that level is also useful and even if it's not super-important it'll be probably just a few more lines once other lint levels are in.
Notes
I've opened this as requested in #12739 (comment)