@@ -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.
@@ -1126,44 +1125,6 @@ You can use the flag like this:
1126
1125
cargo rustdoc -Z unstable-options --output-format json
1127
1126
```
1128
1127
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
-
1167
1128
## codegen-backend
1168
1129
1169
1130
The ` 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
1756
1717
requirement that a credential-provider is configured.
1757
1718
1758
1719
See [ 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