diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2021-03-17 15:20:56 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-17 15:20:56 +0900 |
| commit | b7863f91c6ba36fae52fb06d061e4d64f9b3a972 (patch) | |
| tree | 099b43da1881865aa6351f87bee0f8d15a2a5dfd | |
| parent | 9c7aca58fca17b45ae52aacc5364db2563093bf9 (diff) | |
| parent | b5ca329616e0614822c9767264c63e7c0a30a720 (diff) | |
| download | rust-b7863f91c6ba36fae52fb06d061e4d64f9b3a972.tar.gz rust-b7863f91c6ba36fae52fb06d061e4d64f9b3a972.zip | |
Rollup merge of #83202 - pickfire:patch-6, r=JohnTitor
Show details in cfg version unstable book
| -rw-r--r-- | src/doc/unstable-book/src/language-features/cfg-version.md | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/doc/unstable-book/src/language-features/cfg-version.md b/src/doc/unstable-book/src/language-features/cfg-version.md index 2b1e50835b7..a6ec42cecba 100644 --- a/src/doc/unstable-book/src/language-features/cfg-version.md +++ b/src/doc/unstable-book/src/language-features/cfg-version.md @@ -7,19 +7,20 @@ The tracking issue for this feature is: [#64796] ------------------------ The `cfg_version` feature makes it possible to execute different code -depending on the compiler version. +depending on the compiler version. It will return true if the compiler +version is greater than or equal to the specified version. ## Examples ```rust #![feature(cfg_version)] -#[cfg(version("1.42"))] +#[cfg(version("1.42"))] // 1.42 and above fn a() { // ... } -#[cfg(not(version("1.42")))] +#[cfg(not(version("1.42")))] // 1.41 and below fn a() { // ... } |
