diff options
| author | bors <bors@rust-lang.org> | 2024-06-04 09:38:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-06-04 09:38:16 +0000 |
| commit | 85f90a461262f7ca37a6e629933d455fa9c3ee48 (patch) | |
| tree | 618af55d33d2daec90e4a6f7ba74f13fe1f5476a /compiler/rustc_driver_impl/src | |
| parent | 27529d5c2526eab5aa03d765426c44ea55c5d269 (diff) | |
| parent | a04a6038bb634607d278805199894dc19527b422 (diff) | |
| download | rust-85f90a461262f7ca37a6e629933d455fa9c3ee48.tar.gz rust-85f90a461262f7ca37a6e629933d455fa9c3ee48.zip | |
Auto merge of #125960 - jieyouxu:rollup-1s7f6lr, r=jieyouxu
Rollup of 8 pull requests Successful merges: - #124486 (Add tracking issue and unstable book page for `"vectorcall"` ABI) - #125504 (Change pedantically incorrect OnceCell/OnceLock wording) - #125608 (Avoid follow-up errors if the number of generic parameters already doesn't match) - #125690 (ARM Target Docs Update) - #125750 (Align `Term` methods with `GenericArg` methods, add `Term::expect_*`) - #125818 (Handle no values cfgs with `--print=check-cfg`) - #125909 (rustdoc: add a regression test for a former blanket impl synthesis ICE) - #125919 (Remove stray "this") r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_driver_impl/src')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index 08b97b4953e..627fd74c8d7 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -814,13 +814,17 @@ fn print_crate_info( match expected_values { ExpectedValues::Any => check_cfgs.push(format!("{name}=any()")), ExpectedValues::Some(values) => { - check_cfgs.extend(values.iter().map(|value| { - if let Some(value) = value { - format!("{name}=\"{value}\"") - } else { - name.to_string() - } - })) + if !values.is_empty() { + check_cfgs.extend(values.iter().map(|value| { + if let Some(value) = value { + format!("{name}=\"{value}\"") + } else { + name.to_string() + } + })) + } else { + check_cfgs.push(format!("{name}=")) + } } } } |
