Skip to content

Commit fb06efd

Browse files
committed
improve config::check_incompatible_options_for_ci_rustc logs
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent ad87a6e commit fb06efd

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

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

+11-6
Original file line numberDiff line numberDiff line change
@@ -2681,10 +2681,11 @@ fn check_incompatible_options_for_ci_rustc(
26812681
if Some(current) != $expected.as_ref() {
26822682
return Err(format!(
26832683
"ERROR: Setting `rust.{}` is incompatible with `rust.download-rustc`. \
2684-
Current value: {:?}, Expected value(s): None/{:?}",
2684+
Current value: {:?}, Expected value(s): {}{:?}",
26852685
stringify!($expected).replace("_", "-"),
26862686
$current,
2687-
$expected
2687+
if $expected.is_some() { "None/" } else { "" },
2688+
$expected,
26882689
));
26892690
};
26902691
};
@@ -2693,11 +2694,15 @@ fn check_incompatible_options_for_ci_rustc(
26932694

26942695
macro_rules! warn {
26952696
($current:expr, $expected:expr) => {
2696-
if let Some(current) = $current {
2697-
if Some(current) != $expected {
2697+
if let Some(current) = &$current {
2698+
if Some(current) != $expected.as_ref() {
26982699
println!(
2699-
"WARNING: `rust.{}` has no effect with `rust.download-rustc`.",
2700-
stringify!($expected).replace("_", "-")
2700+
"WARNING: `rust.{}` has no effect with `rust.download-rustc`. \
2701+
Current value: {:?}, Expected value(s): {}{:?}",
2702+
stringify!($expected).replace("_", "-"),
2703+
$current,
2704+
if $expected.is_some() { "None/" } else { "" },
2705+
$expected,
27012706
);
27022707
};
27032708
};

0 commit comments

Comments
 (0)