1
Fork 0

Rollup merge of #131034 - Urgau:cfg-true-false, r=nnethercote

Implement RFC3695 Allow boolean literals as cfg predicates

This PR implements https://github.com/rust-lang/rfcs/pull/3695: allow boolean literals as cfg predicates, i.e. `cfg(true)` and `cfg(false)`.

r? `@nnethercote` *(or anyone with parser knowledge)*
cc `@clubby789`
This commit is contained in:
Guillaume Gomez 2024-10-04 15:42:53 +02:00 committed by GitHub
commit 2ceeeb159d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
26 changed files with 284 additions and 58 deletions

View file

@ -371,6 +371,8 @@ declare_features! (
(unstable, async_for_loop, "1.77.0", Some(118898)),
/// Allows using C-variadics.
(unstable, c_variadic, "1.34.0", Some(44930)),
/// Allows the use of `#[cfg(<true/false>)]`.
(unstable, cfg_boolean_literals, "CURRENT_RUSTC_VERSION", Some(131204)),
/// Allows the use of `#[cfg(overflow_checks)` to check if integer overflow behaviour.
(unstable, cfg_overflow_checks, "1.71.0", Some(111466)),
/// Provides the relocation model information as cfg entry