Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cfg(true) and cfg(false) to conditional compilation (RFC 3695) #1762

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/conditional-compilation.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ r[cfg.syntax]
>       _ConfigurationOption_\
>    | _ConfigurationAll_\
>    | _ConfigurationAny_\
>    | _ConfigurationNot_
>    | _ConfigurationNot_\
>    | `true` | `false`
>
> _ConfigurationOption_ :\
> &nbsp;&nbsp; [IDENTIFIER]&nbsp;(`=` ([STRING_LITERAL] | [RAW_STRING_LITERAL]))<sup>?</sup>
Expand Down Expand Up @@ -49,6 +50,9 @@ r[cfg.predicate.any]
r[cfg.predicate.not]
* `not()` with a configuration predicate. It is true if its predicate is false and false if its predicate is true.

r[cfg.predicate.literal]
* `true` or `false` literals, which are always `true`/`false` respectively.

r[cfg.option-spec]
_Configuration options_ are either names or key-value pairs, and are either set or unset.

Expand Down