Skip to content

Commit 3da5768

Browse files
committed
Rename incremental_verify_ich_cold to incremental_verify_ich_failed
1 parent df31872 commit 3da5768

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

compiler/rustc_query_system/src/query/plumbing.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -585,7 +585,11 @@ fn incremental_verify_ich<CTX, K, V: Debug>(
585585
debug!("END verify_ich({:?})", dep_node);
586586

587587
if Some(new_hash) != old_hash {
588-
incremental_verify_ich_cold(tcx.sess(), DebugArg::from(&dep_node), DebugArg::from(&result));
588+
incremental_verify_ich_failed(
589+
tcx.sess(),
590+
DebugArg::from(&dep_node),
591+
DebugArg::from(&result),
592+
);
589593
}
590594
}
591595

@@ -631,13 +635,7 @@ impl std::fmt::Debug for DebugArg<'_> {
631635
// different implementations for LLVM to chew on (and filling up the final
632636
// binary, too).
633637
#[cold]
634-
fn incremental_verify_ich_cold(sess: &Session, dep_node: DebugArg<'_>, result: DebugArg<'_>) {
635-
let run_cmd = if let Some(crate_name) = &sess.opts.crate_name {
636-
format!("`cargo clean -p {}` or `cargo clean`", crate_name)
637-
} else {
638-
"`cargo clean`".to_string()
639-
};
640-
638+
fn incremental_verify_ich_failed(sess: &Session, dep_node: DebugArg<'_>, result: DebugArg<'_>) {
641639
// When we emit an error message and panic, we try to debug-print the `DepNode`
642640
// and query result. Unfortunately, this can cause us to run additional queries,
643641
// which may result in another fingerprint mismatch while we're in the middle
@@ -653,6 +651,12 @@ fn incremental_verify_ich_cold(sess: &Session, dep_node: DebugArg<'_>, result: D
653651
if old_in_panic {
654652
sess.emit_err(crate::error::Reentrant);
655653
} else {
654+
let run_cmd = if let Some(crate_name) = &sess.opts.crate_name {
655+
format!("`cargo clean -p {}` or `cargo clean`", crate_name)
656+
} else {
657+
"`cargo clean`".to_string()
658+
};
659+
656660
sess.emit_err(crate::error::IncrementCompilation {
657661
run_cmd,
658662
dep_node: format!("{:?}", dep_node),

0 commit comments

Comments
 (0)