Skip to content

Commit b76f6a3

Browse files
committed
print values of incompatible options
Signed-off-by: onur-ozkan <work@onurozkan.dev>
1 parent 0518e8c commit b76f6a3

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]
@@ -2667,11 +2667,14 @@ fn check_incompatible_options_for_ci_rustc(
26672667
) -> Result<(), String> {
26682668
macro_rules! err {
26692669
($current:expr, $expected:expr) => {
2670-
if let Some(current) = $current {
2671-
if Some(current) != $expected {
2670+
if let Some(current) = &$current {
2671+
if Some(current) != $expected.as_ref() {
26722672
return Err(format!(
2673-
"ERROR: Setting `rust.{}` is incompatible with `rust.download-rustc`.",
2674-
stringify!($expected).replace("_", "-")
2673+
"ERROR: Setting `rust.{}` is incompatible with `rust.download-rustc`. \
2674+
Current value: {:?}, Expected value(s): None/{:?}",
2675+
stringify!($expected).replace("_", "-"),
2676+
$current,
2677+
$expected
26752678
));
26762679
};
26772680
};

0 commit comments

Comments
 (0)