File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 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:
21772177* ` unix ` . See ` target_family ` .
21782178* ` windows ` . See ` target_family ` .
21792179
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+
21802188### Lint check attributes
21812189
21822190A lint check names a potentially undesirable coding pattern, such as
@@ -2444,7 +2452,9 @@ The currently implemented features of the reference compiler are:
24442452* ` simd_ffi ` - Allows use of SIMD vectors in signatures for foreign functions.
24452453 The SIMD interface is subject to change.
24462454
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.
24482458
24492459* ` static_assert ` - The ` #[static_assert] ` functionality is experimental and
24502460 unstable. The attribute can be attached to a ` static ` of
You can’t perform that action at this time.
0 commit comments