@@ -22,6 +22,7 @@ use rustc_middle::traits::ObligationCauseCode;
22
22
use rustc_middle:: ty:: { self , RegionVid , Ty , TyCtxt , TypeFoldable } ;
23
23
use rustc_mir_dataflow:: points:: DenseLocationMap ;
24
24
use rustc_span:: Span ;
25
+ use tracing:: instrument;
25
26
26
27
use crate :: constraints:: graph:: { self , NormalConstraintGraph , RegionGraph } ;
27
28
use crate :: dataflow:: BorrowIndex ;
@@ -899,6 +900,7 @@ impl<'tcx> RegionInferenceContext<'tcx> {
899
900
/// Returns `true` if all the elements in the value of `scc_b` are nameable
900
901
/// in `scc_a`. Used during constraint propagation, and only once
901
902
/// the value of `scc_b` has been computed.
903
+ #[ instrument( level = "debug" , skip( self ) ) ]
902
904
fn universe_compatible ( & self , scc_b : ConstraintSccIndex , scc_a : ConstraintSccIndex ) -> bool {
903
905
let universe_a = self . scc_universes [ scc_a] ;
904
906
@@ -912,7 +914,14 @@ impl<'tcx> RegionInferenceContext<'tcx> {
912
914
// Otherwise, we have to iterate over the universe elements in
913
915
// B's value, and check whether all of them are nameable
914
916
// from universe_a
915
- self . scc_values . placeholders_contained_in ( scc_b) . all ( |p| universe_a. can_name ( p. universe ) )
917
+ self . scc_values . placeholders_contained_in ( scc_b) . all ( |p| {
918
+ if universe_a. can_name ( p. universe ) {
919
+ true
920
+ } else {
921
+ debug ! ( "{universe_a:?} cannot name {:?} through {p:?}" , p. universe) ;
922
+ false
923
+ }
924
+ } )
916
925
}
917
926
918
927
/// Extend `scc` so that it can outlive some placeholder region
0 commit comments