mirror of https://github.com/rust-lang/cargo
eff37342ab
Add special `check-cfg` lint config for the `unexpected_cfgs` lint This PR adds a special `check-cfg` lint config for the `unexpected_cfgs` lint, as it was decided by T-cargo (in today's meeting). The goal of this lint config is to provide a simple and cost-less alternative to the build-script `cargo::rustc-check-cfg` instruction. ```toml [lints.rust] unexpected_cfgs = { check-cfg = ["cfg(foo, values(\"bar\"))"] } ``` Regarding the implementation, everything is as straight forward as possible, nothing over-engineered; I added the possibility to omit the `level` field if a sub-config is specified instead, since it seems useful and was easy to implement. There are many small-ish commit, I recommend reviewing them independently. r? `@epage` (or `@weihanglo` maybe) |
||
---|---|---|
.. | ||
bin/cargo | ||
cargo | ||
doc | ||
etc |