Rollup merge of #126356 - epage:check-cfg, r=Urgau
docs(rustc): Improve discoverable of Cargo docs In preparing Cargo's blog post for 1.80, I tried to find the documentation for the lint configuration and I couldn't. The link is only visible from the lint itself, which isn't where I started, and the side bar, which was collapsed for me. The first place I went was the docs for `unexpected_cfgs` because this is configuration for that lint. If using lint configuration were a one off, I could see skipping it here. However, when we discussed this with at least one T-compiler member, there was interest in using this for other lints in the future. To that end, it seems like we should be exposing this with the lint itself. The second place I checked was the `check-cfg` documentation. This now has a call out for the sub-page.
This commit is contained in:
commit
9d946a3f6f
2 changed files with 9 additions and 2 deletions
|
@ -3257,7 +3257,11 @@ declare_lint! {
|
|||
/// See the [Checking Conditional Configurations][check-cfg] section for more
|
||||
/// details.
|
||||
///
|
||||
/// See the [Cargo Specifics][unexpected_cfgs_lint_config] section for configuring this lint in
|
||||
/// `Cargo.toml`.
|
||||
///
|
||||
/// [check-cfg]: https://doc.rust-lang.org/nightly/rustc/check-cfg.html
|
||||
/// [unexpected_cfgs_lint_config]: https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html#check-cfg-in-lintsrust-table
|
||||
pub UNEXPECTED_CFGS,
|
||||
Warn,
|
||||
"detects unexpected names and values in `#[cfg]` conditions",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue