33<!--
44This page is currently (as of May 2024) the canonical place for describing the interaction
55between Cargo and --check-cfg. It is placed in the rustc book rather than the Cargo book
6- since check-cfg is primarely a Rust/rustc feature and is therefor consider by T-cargo to
6+ since check-cfg is primarily a Rust/rustc feature and is therefore considered by T-cargo to
77be an implementation detail, at least --check-cfg and the unexpected_cfgs are owned by
88rustc, not Cargo.
99-->
1010
11- This document is intented to summarize the principal ways Cargo interacts with
11+ This document is intended to summarize the principal ways Cargo interacts with
1212the ` unexpected_cfgs ` lint and ` --check-cfg ` flag. It is not intended to provide
1313individual details, for that refer to the [ ` --check-cfg ` documentation] ( ../check-cfg.md ) and
1414to the [ Cargo book] ( ../../cargo/index.html ) .
@@ -17,7 +17,7 @@ to the [Cargo book](../../cargo/index.html).
1717
1818* See the [ ` [features] ` section in the Cargo book] [ cargo-features ] for more details.*
1919
20- With the ` [features] ` table Cargo provides a mechanism to express conditional compilation and
20+ With the ` [features] ` table, Cargo provides a mechanism to express conditional compilation and
2121optional dependencies. Cargo * automatically* declares corresponding cfgs for every feature as
2222expected.
2323
@@ -32,16 +32,16 @@ my_feature = []
3232
3333## ` check-cfg ` in ` [lints.rust] ` table
3434
35- <!-- Note that T-Cargo considers `[ lints.rust.unexpected_cfgs.check-cfg] ` to be an
36- implementation detail and is therefor not documented in Cargo, we therefor do that ourself -->
35+ <!-- Note that T-Cargo considers `lints.rust.unexpected_cfgs.check-cfg` to be an
36+ implementation detail and is therefore documented here and not in Cargo. -->
3737
3838* See the [ ` [lints] ` section in the Cargo book] [ cargo-lints-table ] for more details.*
3939
40- When using a staticlly known custom config (ie. not dependant on a build-script), Cargo provides
40+ When using a statically known custom config (i.e., not dependent on a build-script), Cargo provides
4141the custom lint config ` check-cfg ` under ` [lints.rust.unexpected_cfgs] ` .
4242
4343It can be used to set custom static [ ` --check-cfg ` ] ( ../check-cfg.md ) args, it is mainly useful when
44- the list of expected cfgs is known is advance.
44+ the list of expected cfgs is known in advance.
4545
4646` Cargo.toml ` :
4747``` toml
0 commit comments