cargo/src
bors eff37342ab Auto merge of #13913 - Urgau:check-cfg-lints-sub-config, r=<try>
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)
2024-05-15 22:15:40 +00:00
..
bin/cargo Auto merge of #13819 - heisen-li:alias, r=weihanglo 2024-04-30 02:56:46 +00:00
cargo Auto merge of #13913 - Urgau:check-cfg-lints-sub-config, r=<try> 2024-05-15 22:15:40 +00:00
doc Fix docs for unstable script feature 2024-05-09 11:38:37 -04:00
etc docs(json): mention dashes replaced with underscores 2024-05-08 13:00:59 -04:00