Files
rust/src/doc
bors b92758a9ae 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 https://github.com/rust-lang/cargo/pull/13913 reaches master!**~ (EDIT: merged in https://github.com/rust-lang/rust/pull/125237)

`@rustbot` label +F-check-cfg
r? `@fmease` *(feel free to roll)*
Fixes https://github.com/rust-lang/rust/issues/124800
cc `@epage` `@weihanglo`
2024-05-20 20:14:09 +00:00
..
2024-05-06 14:01:31 -04:00
2024-04-22 13:00:54 -04:00
2024-05-06 14:01:31 -04:00
2024-04-08 13:01:07 -04:00
2024-05-06 14:01:31 -04:00
2024-05-06 14:01:31 -04:00
2024-05-06 14:01:31 -04:00
2024-05-14 06:00:09 +02:00
2022-01-28 13:42:48 +01:00
2019-09-30 07:46:10 +02:00
2022-01-28 13:42:48 +01:00
2021-07-10 19:51:36 +02:00
2024-03-18 09:13:18 -07:00