Show nicer error when an 'unstable fingerprints' error occurs
This commit is contained in:
parent
266f452118
commit
a4c0793551
1 changed files with 13 additions and 7 deletions
|
@ -605,13 +605,19 @@ fn incremental_verify_ich<CTX, K, V: Debug>(
|
||||||
|
|
||||||
let old_hash = tcx.dep_graph().prev_fingerprint_of(dep_node);
|
let old_hash = tcx.dep_graph().prev_fingerprint_of(dep_node);
|
||||||
|
|
||||||
assert_eq!(
|
if Some(new_hash) != old_hash {
|
||||||
Some(new_hash),
|
let run_cmd = if let Some(crate_name) = &tcx.sess().opts.crate_name {
|
||||||
old_hash,
|
format!("`cargo clean -p {}` or `cargo clean`", crate_name)
|
||||||
"found unstable fingerprints for {:?}: {:?}",
|
} else {
|
||||||
dep_node,
|
"`cargo clean`".to_string()
|
||||||
result
|
};
|
||||||
);
|
tcx.sess().struct_err(&format!("internal compiler error: encountered incremental compilation error with {:?}", dep_node))
|
||||||
|
.help(&format!("This is a known issue with the compiler. Run {} to allow your project to compile", run_cmd))
|
||||||
|
.note(&format!("Please follow the instructions below to create a bug report with the provided information"))
|
||||||
|
.note(&format!("See <https://github.com/rust-lang/rust/issues/84970> for more information"))
|
||||||
|
.emit();
|
||||||
|
panic!("Found unstable fingerprints for {:?}: {:?}", dep_node, result);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn force_query_with_job<C, CTX>(
|
fn force_query_with_job<C, CTX>(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue