about summary refs log tree commit diff
path: root/compiler/rustc_interface/src/interface.rs
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-04-07 07:18:31 +0000
committerGitHub <noreply@github.com>2025-04-07 07:18:31 +0000
commitf6e4d3bc5a22268292b620a570d47df2c204f9c6 (patch)
treeb451ad6d5c40298bbbf4b6bcd2c15e8776c1ccf8 /compiler/rustc_interface/src/interface.rs
parent1a4e85a4e6ce99e4adf8f043fb9f2aa6b2e7ca94 (diff)
parent6ac0120a60d543d9557d2affd334ba02704c9fb8 (diff)
Merge pull request #4252 from rust-lang/rustup-2025-04-07
Automatic Rustup
Diffstat (limited to 'compiler/rustc_interface/src/interface.rs')
-rw-r--r--compiler/rustc_interface/src/interface.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs
index 3f87b1a547b..33b4a48b28d 100644
--- a/compiler/rustc_interface/src/interface.rs
+++ b/compiler/rustc_interface/src/interface.rs
@@ -204,6 +204,14 @@ pub(crate) fn parse_check_cfg(dcx: DiagCtxtHandle<'_>, specs: Vec<String>) -> Ch
                     error!("`cfg()` names cannot be after values");
                 }
                 names.push(ident);
+            } else if let Some(boolean) = arg.boolean_literal() {
+                if values_specified {
+                    error!("`cfg()` names cannot be after values");
+                }
+                names.push(rustc_span::Ident::new(
+                    if boolean { rustc_span::kw::True } else { rustc_span::kw::False },
+                    arg.span(),
+                ));
             } else if arg.has_name(sym::any)
                 && let Some(args) = arg.meta_item_list()
             {