@@ -641,7 +641,7 @@ pub(crate) fn incremental_verify_ich<Tcx, V: Debug>(
641
641
Tcx : DepContext ,
642
642
{
643
643
if !dep_graph_data. is_index_green ( prev_index) {
644
- incremental_verify_ich_not_green :: < Tcx > ( prev_index)
644
+ incremental_verify_ich_not_green ( tcx , prev_index)
645
645
}
646
646
647
647
let new_hash = hash_result. map_or ( Fingerprint :: ZERO , |f| {
@@ -651,31 +651,32 @@ pub(crate) fn incremental_verify_ich<Tcx, V: Debug>(
651
651
let old_hash = dep_graph_data. prev_fingerprint_of ( prev_index) ;
652
652
653
653
if new_hash != old_hash {
654
- incremental_verify_ich_failed :: < Tcx > ( prev_index, result) ;
654
+ incremental_verify_ich_failed ( tcx , prev_index, result) ;
655
655
}
656
656
}
657
657
658
658
#[ cold]
659
659
#[ inline( never) ]
660
- fn incremental_verify_ich_not_green < Tcx > ( prev_index : SerializedDepNodeIndex )
660
+ fn incremental_verify_ich_not_green < Tcx > ( tcx : Tcx , prev_index : SerializedDepNodeIndex )
661
661
where
662
662
Tcx : DepContext ,
663
663
{
664
- Tcx :: with_context ( |tcx| {
665
- panic ! (
666
- "fingerprint for green query instance not loaded from cache: {:?}" ,
667
- tcx. dep_graph( ) . data( ) . unwrap( ) . prev_node_of( prev_index)
668
- )
669
- } )
664
+ panic ! (
665
+ "fingerprint for green query instance not loaded from cache: {:?}" ,
666
+ tcx. dep_graph( ) . data( ) . unwrap( ) . prev_node_of( prev_index)
667
+ )
670
668
}
671
669
672
670
// Note that this is marked #[cold] and intentionally takes `dyn Debug` for `result`,
673
671
// as we want to avoid generating a bunch of different implementations for LLVM to
674
672
// chew on (and filling up the final binary, too).
675
673
#[ cold]
676
674
#[ inline( never) ]
677
- fn incremental_verify_ich_failed < Tcx > ( prev_index : SerializedDepNodeIndex , result : & dyn Debug )
678
- where
675
+ fn incremental_verify_ich_failed < Tcx > (
676
+ tcx : Tcx ,
677
+ prev_index : SerializedDepNodeIndex ,
678
+ result : & dyn Debug ,
679
+ ) where
679
680
Tcx : DepContext ,
680
681
{
681
682
// When we emit an error message and panic, we try to debug-print the `DepNode`
@@ -690,25 +691,23 @@ where
690
691
691
692
let old_in_panic = INSIDE_VERIFY_PANIC . with ( |in_panic| in_panic. replace ( true ) ) ;
692
693
693
- Tcx :: with_context ( |tcx| {
694
- if old_in_panic {
695
- tcx. sess ( ) . emit_err ( crate :: error:: Reentrant ) ;
694
+ if old_in_panic {
695
+ tcx. sess ( ) . emit_err ( crate :: error:: Reentrant ) ;
696
+ } else {
697
+ let run_cmd = if let Some ( crate_name) = & tcx. sess ( ) . opts . crate_name {
698
+ format ! ( "`cargo clean -p {crate_name}` or `cargo clean`" )
696
699
} else {
697
- let run_cmd = if let Some ( crate_name) = & tcx. sess ( ) . opts . crate_name {
698
- format ! ( "`cargo clean -p {crate_name}` or `cargo clean`" )
699
- } else {
700
- "`cargo clean`" . to_string ( )
701
- } ;
700
+ "`cargo clean`" . to_string ( )
701
+ } ;
702
702
703
- let dep_node = tcx. dep_graph ( ) . data ( ) . unwrap ( ) . prev_node_of ( prev_index) ;
703
+ let dep_node = tcx. dep_graph ( ) . data ( ) . unwrap ( ) . prev_node_of ( prev_index) ;
704
704
705
- let dep_node = tcx. sess ( ) . emit_err ( crate :: error:: IncrementCompilation {
706
- run_cmd,
707
- dep_node : format ! ( "{dep_node:?}" ) ,
708
- } ) ;
709
- panic ! ( "Found unstable fingerprints for {dep_node:?}: {result:?}" ) ;
710
- }
711
- } ) ;
705
+ let dep_node = tcx. sess ( ) . emit_err ( crate :: error:: IncrementCompilation {
706
+ run_cmd,
707
+ dep_node : format ! ( "{dep_node:?}" ) ,
708
+ } ) ;
709
+ panic ! ( "Found unstable fingerprints for {dep_node:?}: {result:?}" ) ;
710
+ }
712
711
713
712
INSIDE_VERIFY_PANIC . with ( |in_panic| in_panic. set ( old_in_panic) ) ;
714
713
}
0 commit comments