diff options
| author | onur-ozkan <work@onurozkan.dev> | 2024-08-14 11:11:40 +0300 |
|---|---|---|
| committer | onur-ozkan <work@onurozkan.dev> | 2024-08-14 18:59:17 +0300 |
| commit | 151e8cd2f84894c62b76d1bffa2b50ddb0bfcd9b (patch) | |
| tree | c611c6ea1599ce8c657ed8c27099770a21c29efd | |
| parent | 4d13470834bb651362c9af0dd56419ebc83d6293 (diff) | |
| download | rust-151e8cd2f84894c62b76d1bffa2b50ddb0bfcd9b.tar.gz rust-151e8cd2f84894c62b76d1bffa2b50ddb0bfcd9b.zip | |
improve `config::check_incompatible_options_for_ci_rustc` logs
Signed-off-by: onur-ozkan <work@onurozkan.dev>
| -rw-r--r-- | src/bootstrap/src/core/config/config.rs | 17 |
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, ); }; }; |
