Skip to content

Commit 8e1919b

Browse files
onur-ozkanrezwanahmedsami
authored andcommitted
improve config::check_incompatible_options_for_ci_rustc logs
Signed-off-by: onur-ozkan <[email protected]>
1 parent c653788 commit 8e1919b

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

src/bootstrap/src/core/config/config.rs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2693,10 +2693,11 @@ fn check_incompatible_options_for_ci_rustc(
26932693
if Some(current) != $expected.as_ref() {
26942694
return Err(format!(
26952695
"ERROR: Setting `rust.{}` is incompatible with `rust.download-rustc`. \
2696-
Current value: {:?}, Expected value(s): None/{:?}",
2696+
Current value: {:?}, Expected value(s): {}{:?}",
26972697
stringify!($expected).replace("_", "-"),
26982698
$current,
2699-
$expected
2699+
if $expected.is_some() { "None/" } else { "" },
2700+
$expected,
27002701
));
27012702
};
27022703
};
@@ -2705,11 +2706,15 @@ fn check_incompatible_options_for_ci_rustc(
27052706

27062707
macro_rules! warn {
27072708
($current:expr, $expected:expr) => {
2708-
if let Some(current) = $current {
2709-
if Some(current) != $expected {
2709+
if let Some(current) = &$current {
2710+
if Some(current) != $expected.as_ref() {
27102711
println!(
2711-
"WARNING: `rust.{}` has no effect with `rust.download-rustc`.",
2712-
stringify!($expected).replace("_", "-")
2712+
"WARNING: `rust.{}` has no effect with `rust.download-rustc`. \
2713+
Current value: {:?}, Expected value(s): {}{:?}",
2714+
stringify!($expected).replace("_", "-"),
2715+
$current,
2716+
if $expected.is_some() { "None/" } else { "" },
2717+
$expected,
27132718
);
27142719
};
27152720
};

0 commit comments

Comments
 (0)