Skip to content

Commit 1110837

Browse files
authored
Clarify fingerprint log messages
1 parent 134f614 commit 1110837

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

src/cargo/core/compiler/fingerprint.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -817,9 +817,9 @@ impl Fingerprint {
817817
}
818818
if self.features != old.features {
819819
bail!(
820-
"features have changed: {} != {}",
821-
self.features,
822-
old.features
820+
"features have changed: previously {}, now {}",
821+
old.features,
822+
self.features
823823
)
824824
}
825825
if self.target != old.target {
@@ -833,9 +833,9 @@ impl Fingerprint {
833833
}
834834
if self.rustflags != old.rustflags {
835835
bail!(
836-
"RUSTFLAGS has changed: {:?} != {:?}",
837-
self.rustflags,
838-
old.rustflags
836+
"RUSTFLAGS has changed: previously {:?}, now {:?}",
837+
old.rustflags,
838+
self.rustflags
839839
)
840840
}
841841
if self.metadata != old.metadata {
@@ -853,15 +853,15 @@ impl Fingerprint {
853853
match (new, old) {
854854
(LocalFingerprint::Precalculated(a), LocalFingerprint::Precalculated(b)) => {
855855
if a != b {
856-
bail!("precalculated components have changed: {} != {}", a, b)
856+
bail!("precalculated components have changed: previously {}, now {}", b, a)
857857
}
858858
}
859859
(
860860
LocalFingerprint::CheckDepInfo { dep_info: adep },
861861
LocalFingerprint::CheckDepInfo { dep_info: bdep },
862862
) => {
863863
if adep != bdep {
864-
bail!("dep info output changed: {:?} != {:?}", adep, bdep)
864+
bail!("dep info output changed: previously {:?}, now {:?}", bdep, adep)
865865
}
866866
}
867867
(
@@ -875,13 +875,13 @@ impl Fingerprint {
875875
},
876876
) => {
877877
if aout != bout {
878-
bail!("rerun-if-changed output changed: {:?} != {:?}", aout, bout)
878+
bail!("rerun-if-changed output changed: previously {:?}, now {:?}", bout, aout)
879879
}
880880
if apaths != bpaths {
881881
bail!(
882-
"rerun-if-changed output changed: {:?} != {:?}",
883-
apaths,
882+
"rerun-if-changed output changed: previously {:?}, now {:?}",
884883
bpaths,
884+
apaths,
885885
)
886886
}
887887
}
@@ -896,11 +896,11 @@ impl Fingerprint {
896896
},
897897
) => {
898898
if *akey != *bkey {
899-
bail!("env vars changed: {} != {}", akey, bkey);
899+
bail!("env vars changed: previously {}, now {}", bkey, akey);
900900
}
901901
if *avalue != *bvalue {
902902
bail!(
903-
"env var `{}` changed: previously {:?} now {:?}",
903+
"env var `{}` changed: previously {:?}, now {:?}",
904904
akey,
905905
bvalue,
906906
avalue

0 commit comments

Comments
 (0)