Skip to content

Commit b6fb99a

Browse files
onur-ozkanrezwanahmedsami
authored andcommitted
print values of incompatible options
Signed-off-by: onur-ozkan <[email protected]>
1 parent 43972b6 commit b6fb99a

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub enum DryRun {
4747
UserSelected,
4848
}
4949

50-
#[derive(Copy, Clone, Default, PartialEq, Eq)]
50+
#[derive(Copy, Clone, Default, Debug, Eq, PartialEq)]
5151
pub enum DebuginfoLevel {
5252
#[default]
5353
None,
@@ -117,7 +117,7 @@ impl Display for DebuginfoLevel {
117117
/// 2) MSVC
118118
/// - Self-contained: `-Clinker=<path to rust-lld>`
119119
/// - External: `-Clinker=lld`
120-
#[derive(Copy, Clone, Default, PartialEq)]
120+
#[derive(Copy, Clone, Default, Debug, PartialEq)]
121121
pub enum LldMode {
122122
/// Do not use LLD
123123
#[default]
@@ -2679,11 +2679,14 @@ fn check_incompatible_options_for_ci_rustc(
26792679
) -> Result<(), String> {
26802680
macro_rules! err {
26812681
($current:expr, $expected:expr) => {
2682-
if let Some(current) = $current {
2683-
if Some(current) != $expected {
2682+
if let Some(current) = &$current {
2683+
if Some(current) != $expected.as_ref() {
26842684
return Err(format!(
2685-
"ERROR: Setting `rust.{}` is incompatible with `rust.download-rustc`.",
2686-
stringify!($expected).replace("_", "-")
2685+
"ERROR: Setting `rust.{}` is incompatible with `rust.download-rustc`. \
2686+
Current value: {:?}, Expected value(s): None/{:?}",
2687+
stringify!($expected).replace("_", "-"),
2688+
$current,
2689+
$expected
26872690
));
26882691
};
26892692
};

0 commit comments

Comments
 (0)