about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/bootstrap/src/core/config/config.rs17
1 files changed, 11 insertions, 6 deletions
diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/config/config.rs
index 5f1d923b3f8..00c564a0e29 100644
--- a/src/bootstrap/src/core/config/config.rs
+++ b/src/bootstrap/src/core/config/config.rs
@@ -2681,10 +2681,11 @@ fn check_incompatible_options_for_ci_rustc(
                 if Some(current) != $expected.as_ref() {
                     return Err(format!(
                         "ERROR: Setting `rust.{}` is incompatible with `rust.download-rustc`. \
-                        Current value: {:?}, Expected value(s): None/{:?}",
+                        Current value: {:?}, Expected value(s): {}{:?}",
                         stringify!($expected).replace("_", "-"),
                         $current,
-                        $expected
+                        if $expected.is_some() { "None/" } else { "" },
+                        $expected,
                     ));
                 };
             };
@@ -2693,11 +2694,15 @@ fn check_incompatible_options_for_ci_rustc(
 
     macro_rules! warn {
         ($current:expr, $expected:expr) => {
-            if let Some(current) = $current {
-                if Some(current) != $expected {
+            if let Some(current) = &$current {
+                if Some(current) != $expected.as_ref() {
                     println!(
-                        "WARNING: `rust.{}` has no effect with `rust.download-rustc`.",
-                        stringify!($expected).replace("_", "-")
+                        "WARNING: `rust.{}` has no effect with `rust.download-rustc`. \
+                        Current value: {:?}, Expected value(s): {}{:?}",
+                        stringify!($expected).replace("_", "-"),
+                        $current,
+                        if $expected.is_some() { "None/" } else { "" },
+                        $expected,
                     );
                 };
             };