@@ -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.
@@ -1127,44 +1126,6 @@ You can use the flag like this:
11271126cargo rustdoc -Z unstable-options --output-format json
11281127```
11291128
1130- ## check-cfg
1131-
1132- * RFC: [ #3013 ] ( https://github.com/rust-lang/rfcs/pull/3013 )
1133- * Tracking Issue: [ #10554 ] ( https://github.com/rust-lang/cargo/issues/10554 )
1134-
1135- ` -Z check-cfg ` command line enables compile time checking of Cargo features as well as ` rustc `
1136- well known names and values in ` #[cfg] ` , ` cfg! ` , ` #[link] ` and ` #[cfg_attr] ` with the ` rustc `
1137- and ` rustdoc ` unstable ` --check-cfg ` command line.
1138-
1139- You can use the flag like this:
1140-
1141- ```
1142- cargo check -Z unstable-options -Z check-cfg
1143- ```
1144-
1145- ### ` cargo::rustc-check-cfg=CHECK_CFG `
1146-
1147- The ` rustc-check-cfg ` instruction tells Cargo to pass the given value to the
1148- ` --check-cfg ` flag to the compiler. This may be used for compile-time
1149- detection of unexpected conditional compilation name and/or values.
1150-
1151- This can only be used in combination with ` -Zcheck-cfg ` otherwise it is ignored
1152- with a warning.
1153-
1154- If you want to integrate with Cargo features, only use ` -Zcheck-cfg ` instead of
1155- trying to do it manually with this option.
1156-
1157- You can use the instruction like this:
1158-
1159- ``` rust,no_run
1160- // build.rs
1161- println!("cargo::rustc-check-cfg=cfg(foo, bar)");
1162- ```
1163-
1164- ```
1165- cargo check -Z unstable-options -Z check-cfg
1166- ```
1167-
11681129## codegen-backend
11691130
11701131The ` codegen-backend ` feature makes it possible to select the codegen backend used by rustc using a profile.
@@ -1771,3 +1732,11 @@ The `-Z registry-auth` feature has been stabilized in the 1.74 release with the
17711732requirement that a credential-provider is configured.
17721733
17731734See [ Registry Authentication] ( registry-authentication.md ) documentation for details.
1735+
1736+ ## check-cfg
1737+
1738+ The ` -Z check-cfg ` feature has been stabilized in the CURRENT_CARGO_RELEASE release by
1739+ making it the default behavior.
1740+
1741+ See the [ build script documentation] ( build-scripts.md#rustc-check-cfg ) for informations
1742+ about specifying custom cfgs.
0 commit comments