From 2908ab995026b753bd006caca2e800c232478225 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Mon, 17 Mar 2025 13:47:23 -0700 Subject: [PATCH] Add `cfg(true)` and `cfg(false)` to conditional compilation (RFC 3695) --- src/conditional-compilation.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/conditional-compilation.md b/src/conditional-compilation.md index c7cf839ff..7440fe0c2 100644 --- a/src/conditional-compilation.md +++ b/src/conditional-compilation.md @@ -8,6 +8,8 @@ ConfigurationPredicate -> | ConfigurationAll | ConfigurationAny | ConfigurationNot + | `true` + | `false` ConfigurationOption -> IDENTIFIER ( `=` ( STRING_LITERAL | RAW_STRING_LITERAL ) )? @@ -50,6 +52,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 or false respectively. + r[cfg.option-spec] _Configuration options_ are either names or key-value pairs, and are either set or unset.