diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2024-10-04 15:42:53 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-10-04 15:42:53 +0200 |
| commit | 2ceeeb159dc5aa13cd090ade1b013c51461949a5 (patch) | |
| tree | abfd471990fd393fbd7cc4801180085415a07d6d /compiler/rustc_feature/src | |
| parent | 3002af6cb643138839537f6fd0265162610fdbbe (diff) | |
| parent | a3ffa1eae507809628decc6250b28db6ab167b11 (diff) | |
| download | rust-2ceeeb159dc5aa13cd090ade1b013c51461949a5.tar.gz rust-2ceeeb159dc5aa13cd090ade1b013c51461949a5.zip | |
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`
Diffstat (limited to 'compiler/rustc_feature/src')
| -rw-r--r-- | compiler/rustc_feature/src/unstable.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_feature/src/unstable.rs b/compiler/rustc_feature/src/unstable.rs index c5530097e96..380e36fe405 100644 --- a/compiler/rustc_feature/src/unstable.rs +++ b/compiler/rustc_feature/src/unstable.rs @@ -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 |
