File tree 1 file changed +11
-1
lines changed
1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -2177,6 +2177,14 @@ The following configurations must be defined by the implementation:
2177
2177
* ` unix ` . See ` target_family ` .
2178
2178
* ` windows ` . See ` target_family ` .
2179
2179
2180
+ You can also set another attribute based on a ` cfg ` variable with ` cfg_attr ` :
2181
+
2182
+ ``` rust,ignore
2183
+ #[cfg_attr(a, b)]
2184
+ ```
2185
+
2186
+ Will be the same as ` #[b] ` if ` a ` is set by ` cfg ` , and nothing otherwise.
2187
+
2180
2188
### Lint check attributes
2181
2189
2182
2190
A lint check names a potentially undesirable coding pattern, such as
@@ -2444,7 +2452,9 @@ The currently implemented features of the reference compiler are:
2444
2452
* ` simd_ffi ` - Allows use of SIMD vectors in signatures for foreign functions.
2445
2453
The SIMD interface is subject to change.
2446
2454
2447
- * ` staged_api ` - Allows usage of stability markers and ` #![staged_api] ` in a crate
2455
+ * ` staged_api ` - Allows usage of stability markers and ` #![staged_api] ` in a
2456
+ crate. Stability markers are also attributes: ` #[stable] ` ,
2457
+ ` #[unstable] ` , and ` #[deprecated] ` are the three levels.
2448
2458
2449
2459
* ` static_assert ` - The ` #[static_assert] ` functionality is experimental and
2450
2460
unstable. The attribute can be attached to a ` static ` of
You can’t perform that action at this time.
0 commit comments