Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #125219 - Urgau:check-cfg-cargo-config, r=fmease
Update `unexpected_cfgs` lint for Cargo new `check-cfg` config This PR updates the diagnostics output of the `unexpected_cfgs` lint for Cargo new `check-cfg` config. It's a simple and cost-less alternative to the build-script `cargo::rustc-check-cfg` instruction. ```toml [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(foo, values("bar"))'] } ``` This PR also adds a Cargo specific section regarding check-cfg and Cargo inside rustc's book (motivation is described inside the file, but mainly check-cfg is a rustc feature not a Cargo one, Cargo only enabled the feature, it does not own it; T-cargo even considers the `check-cfg` lint config to be an implementation detail). This PR also updates the links to refer to that sub-page when using Cargo from rustc. As well as updating the lint doc to refer to the check-cfg docs. ~**Not to be merged before rust-lang/cargo#13913 reaches master!**~ (EDIT: merged in rust-lang/rust#125237) `@rustbot` label +F-check-cfg r? `@fmease` *(feel free to roll)* Fixes rust-lang/rust#124800 cc `@epage` `@weihanglo`
- Loading branch information