Skip to content

Commit 1519a72

Browse files
committed
---
yaml --- r: 209508 b: refs/heads/try c: 00a8d65 h: refs/heads/master v: v3
1 parent e3678ea commit 1519a72

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 3e561f05c00cd180ec02db4ccab2840a4aba93d2
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
5-
refs/heads/try: 3908bae77b402623794370c976d6c2c2a3b699d4
5+
refs/heads/try: 00a8d65ef3389164f1c71ec95f686530fdfc9d9d
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/doc/reference.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff 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

21822190
A 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

0 commit comments

Comments
 (0)