@@ -83,7 +83,6 @@ For the latest nightly, see the [nightly version] of this page.
8383 * [ build-std-features] ( #build-std-features ) --- Sets features to use with the standard library.
8484 * [ binary-dep-depinfo] ( #binary-dep-depinfo ) --- Causes the dep-info file to track binary dependencies.
8585 * [ panic-abort-tests] ( #panic-abort-tests ) --- Allows running tests with the "abort" panic strategy.
86- * [ check-cfg] ( #check-cfg ) --- Compile-time validation of ` cfg ` expressions.
8786 * [ host-config] ( #host-config ) --- Allows setting ` [target] ` -like configuration settings for host build targets.
8887 * [ target-applies-to-host] ( #target-applies-to-host ) --- Alters whether certain flags will be passed to host build targets.
8988 * [ gc] ( #gc ) --- Global cache garbage collection.
@@ -1126,44 +1125,6 @@ You can use the flag like this:
11261125cargo rustdoc -Z unstable-options --output-format json
11271126```
11281127
1129- ## check-cfg
1130-
1131- * RFC: [ #3013 ] ( https://github.com/rust-lang/rfcs/pull/3013 )
1132- * Tracking Issue: [ #10554 ] ( https://github.com/rust-lang/cargo/issues/10554 )
1133-
1134- ` -Z check-cfg ` command line enables compile time checking of Cargo features as well as ` rustc `
1135- well known names and values in ` #[cfg] ` , ` cfg! ` , ` #[link] ` and ` #[cfg_attr] ` with the ` rustc `
1136- and ` rustdoc ` unstable ` --check-cfg ` command line.
1137-
1138- You can use the flag like this:
1139-
1140- ```
1141- cargo check -Z unstable-options -Z check-cfg
1142- ```
1143-
1144- ### ` cargo::rustc-check-cfg=CHECK_CFG `
1145-
1146- The ` rustc-check-cfg ` instruction tells Cargo to pass the given value to the
1147- ` --check-cfg ` flag to the compiler. This may be used for compile-time
1148- detection of unexpected conditional compilation name and/or values.
1149-
1150- This can only be used in combination with ` -Zcheck-cfg ` otherwise it is ignored
1151- with a warning.
1152-
1153- If you want to integrate with Cargo features, only use ` -Zcheck-cfg ` instead of
1154- trying to do it manually with this option.
1155-
1156- You can use the instruction like this:
1157-
1158- ``` rust,no_run
1159- // build.rs
1160- println!("cargo::rustc-check-cfg=cfg(foo, bar)");
1161- ```
1162-
1163- ```
1164- cargo check -Z unstable-options -Z check-cfg
1165- ```
1166-
11671128## codegen-backend
11681129
11691130The ` codegen-backend ` feature makes it possible to select the codegen backend used by rustc using a profile.
@@ -1756,3 +1717,11 @@ The `-Z registry-auth` feature has been stabilized in the 1.74 release with the
17561717requirement that a credential-provider is configured.
17571718
17581719See [ Registry Authentication] ( registry-authentication.md ) documentation for details.
1720+
1721+ ## check-cfg
1722+
1723+ The ` -Z check-cfg ` feature has been stabilized in the CURRENT_CARGO_RELEASE release by
1724+ making it the default behavior.
1725+
1726+ See the [ build script documentation] ( build-scripts.md#rustc-check-cfg ) for informations
1727+ about specifying custom cfgs.
0 commit comments