Skip to content

Commit a1f0c09

Browse files
authored
Merge pull request #56 from dtolnay/cfgdoc
Document `rustversion::cfg!`
2 parents 06e9943 + 8371f59 commit a1f0c09

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,11 @@ rustversion = "1.0"
7373
—<br>
7474
For conditional inclusion of attributes; analogous to `cfg_attr`.
7575

76+
- <b>`rustversion::cfg!(`</b><i>selector</i><b>`)`</b>
77+
—<br>
78+
An expression form of any of the above attributes; for example
79+
*if rustversion::cfg!(any(stable, beta)) { ... }*.
80+
7681
<br>
7782

7883
## Use cases

src/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,13 @@
9393
//! <code style="display:inline">cfg_attr</code>.
9494
//! </p>
9595
//!
96+
//! - <p style="margin-left:50px;text-indent:-50px">
97+
//! <b><code style="display:inline">rustversion::cfg!(</code></b><i>selector</i><b><code style="display:inline">)</code></b>
98+
//! —<br>
99+
//! An expression form of any of the above attributes; for example
100+
//! <i>if rustversion::cfg!(any(stable, beta)) { ... }</i>.
101+
//! </p>
102+
//!
96103
//! <br>
97104
//!
98105
//! # Use cases

0 commit comments

Comments
 (0)