@@ -585,7 +585,11 @@ fn incremental_verify_ich<CTX, K, V: Debug>(
585
585
debug ! ( "END verify_ich({:?})" , dep_node) ;
586
586
587
587
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
+ ) ;
589
593
}
590
594
}
591
595
@@ -631,13 +635,7 @@ impl std::fmt::Debug for DebugArg<'_> {
631
635
// different implementations for LLVM to chew on (and filling up the final
632
636
// binary, too).
633
637
#[ 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 < ' _ > ) {
641
639
// When we emit an error message and panic, we try to debug-print the `DepNode`
642
640
// and query result. Unfortunately, this can cause us to run additional queries,
643
641
// 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
653
651
if old_in_panic {
654
652
sess. emit_err ( crate :: error:: Reentrant ) ;
655
653
} 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
+
656
660
sess. emit_err ( crate :: error:: IncrementCompilation {
657
661
run_cmd,
658
662
dep_node : format ! ( "{:?}" , dep_node) ,
0 commit comments