Skip to content

Commit 9232bd2

Browse files
committed
docs(rustc): Link unexpected_cfgs to the Cargo.toml docs
This is the first time we have a lint with configuration exposed in `Cargo.toml`. When this was done, interest was expressed in using this for other cases in the future. To this end, we need to make the documentation for the lint configuration discoverable from the documentation for that lint.
1 parent 6d93626 commit 9232bd2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_lint_defs/src/builtin.rs

+4
Original file line numberDiff line numberDiff line change
@@ -3256,7 +3256,11 @@ declare_lint! {
32563256
/// See the [Checking Conditional Configurations][check-cfg] section for more
32573257
/// details.
32583258
///
3259+
/// See the [Cargo Specifics][unexpected_cfgs_lint_config] section for configuring this lint in
3260+
/// `Cargo.toml`.
3261+
///
32593262
/// [check-cfg]: https://doc.rust-lang.org/nightly/rustc/check-cfg.html
3263+
/// [unexpected_cfgs_lint_config]: https://doc.rust-lang.org/nightly/rustc/check-cfg/cargo-specifics.html#check-cfg-in-lintsrust-table
32603264
pub UNEXPECTED_CFGS,
32613265
Warn,
32623266
"detects unexpected names and values in `#[cfg]` conditions",

0 commit comments

Comments
 (0)