@@ -83,7 +83,6 @@ For the latest nightly, see the [nightly version] of this page.
83
83
* [ build-std-features] ( #build-std-features ) --- Sets features to use with the standard library.
84
84
* [ binary-dep-depinfo] ( #binary-dep-depinfo ) --- Causes the dep-info file to track binary dependencies.
85
85
* [ 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.
87
86
* [ host-config] ( #host-config ) --- Allows setting ` [target] ` -like configuration settings for host build targets.
88
87
* [ target-applies-to-host] ( #target-applies-to-host ) --- Alters whether certain flags will be passed to host build targets.
89
88
* [ gc] ( #gc ) --- Global cache garbage collection.
@@ -1141,44 +1140,6 @@ You can use the flag like this:
1141
1140
cargo rustdoc -Z unstable-options --output-format json
1142
1141
```
1143
1142
1144
- ## check-cfg
1145
-
1146
- * RFC: [ #3013 ] ( https://github.com/rust-lang/rfcs/pull/3013 )
1147
- * Tracking Issue: [ #10554 ] ( https://github.com/rust-lang/cargo/issues/10554 )
1148
-
1149
- ` -Z check-cfg ` command line enables compile time checking of Cargo features as well as ` rustc `
1150
- well known names and values in ` #[cfg] ` , ` cfg! ` , ` #[link] ` and ` #[cfg_attr] ` with the ` rustc `
1151
- and ` rustdoc ` unstable ` --check-cfg ` command line.
1152
-
1153
- You can use the flag like this:
1154
-
1155
- ```
1156
- cargo check -Z unstable-options -Z check-cfg
1157
- ```
1158
-
1159
- ### ` cargo::rustc-check-cfg=CHECK_CFG `
1160
-
1161
- The ` rustc-check-cfg ` instruction tells Cargo to pass the given value to the
1162
- ` --check-cfg ` flag to the compiler. This may be used for compile-time
1163
- detection of unexpected conditional compilation name and/or values.
1164
-
1165
- This can only be used in combination with ` -Zcheck-cfg ` otherwise it is ignored
1166
- with a warning.
1167
-
1168
- If you want to integrate with Cargo features, only use ` -Zcheck-cfg ` instead of
1169
- trying to do it manually with this option.
1170
-
1171
- You can use the instruction like this:
1172
-
1173
- ``` rust,no_run
1174
- // build.rs
1175
- println!("cargo::rustc-check-cfg=cfg(foo, bar)");
1176
- ```
1177
-
1178
- ```
1179
- cargo check -Z unstable-options -Z check-cfg
1180
- ```
1181
-
1182
1143
## codegen-backend
1183
1144
1184
1145
The ` codegen-backend ` feature makes it possible to select the codegen backend used by rustc using a profile.
@@ -1785,3 +1746,11 @@ The `-Z registry-auth` feature has been stabilized in the 1.74 release with the
1785
1746
requirement that a credential-provider is configured.
1786
1747
1787
1748
See [ Registry Authentication] ( registry-authentication.md ) documentation for details.
1749
+
1750
+ ## check-cfg
1751
+
1752
+ The ` -Z check-cfg ` feature has been stabilized in the CURRENT_CARGO_RELEASE release by
1753
+ making it the default behavior.
1754
+
1755
+ See the [ build script documentation] ( build-scripts.md#rustc-check-cfg ) for informations
1756
+ about specifying custom cfgs.
0 commit comments