Skip to content

Commit

Permalink
Document rustversion::cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 26, 2024
1 parent 06e9943 commit 8371f59
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ rustversion = "1.0"
—<br>
For conditional inclusion of attributes; analogous to `cfg_attr`.

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

<br>

## Use cases
Expand Down
7 changes: 7 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,13 @@
//! <code style="display:inline">cfg_attr</code>.
//! </p>
//!
//! - <p style="margin-left:50px;text-indent:-50px">
//! <b><code style="display:inline">rustversion::cfg!(</code></b><i>selector</i><b><code style="display:inline">)</code></b>
//! —<br>
//! An expression form of any of the above attributes; for example
//! <i>if rustversion::cfg!(any(stable, beta)) { ... }</i>.
//! </p>
//!
//! <br>
//!
//! # Use cases
Expand Down

0 comments on commit 8371f59

Please sign in to comment.