@@ -389,6 +389,13 @@ impl<'tcx> RegionInferenceContext<'tcx> {
389
389
390
390
result. init_free_and_bound_regions ( ) ;
391
391
392
+ debug ! ( "Variables and their origins" ) ;
393
+ for variable in result. definitions . indices ( ) {
394
+ let origin = result. definitions [ variable] . origin ;
395
+ let universe = result. definitions [ variable] . universe ;
396
+ debug ! ( ?variable, ?origin, ?universe) ;
397
+ }
398
+
392
399
result
393
400
}
394
401
@@ -560,16 +567,16 @@ impl<'tcx> RegionInferenceContext<'tcx> {
560
567
// universe of the scc can name this region.
561
568
let scc_universe = self . scc_universes [ scc] ;
562
569
if scc_universe. can_name ( placeholder. universe ) {
563
- debug ! (
564
- "init_free_and_bound_regions: placeholder {:?} *is* \
565
- compatible with universe {:?} of its SCC {:?}",
566
- placeholder, scc_universe, scc,
567
- ) ;
570
+ // debug!(
571
+ // "init_free_and_bound_regions: placeholder {:?} *is* \
572
+ // compatible with universe {:?} of its SCC {:?}",
573
+ // placeholder, scc_universe, scc,
574
+ // );
568
575
self . scc_values . add_element ( scc, placeholder) ;
569
576
} else {
570
577
debug ! (
571
- "init_free_and_bound_regions: placeholder {:?} is \
572
- not compatible with universe {:?} of its SCC {:?}",
578
+ "init_free_and_bound_regions: placeholder {:?} \
579
+ incompatible with universe {:?} of its SCC {:?}",
573
580
placeholder, scc_universe, scc,
574
581
) ;
575
582
self . add_incompatible_universe ( scc) ;
@@ -905,18 +912,13 @@ impl<'tcx> RegionInferenceContext<'tcx> {
905
912
/// Returns `true` if all the elements in the value of `scc_b` are nameable
906
913
/// in `scc_a`. Used during constraint propagation, and only once
907
914
/// the value of `scc_b` has been computed.
908
- #[ instrument( level = "debug" , skip( self ) ) ]
909
915
fn universe_compatible ( & self , scc_b : ConstraintSccIndex , scc_a : ConstraintSccIndex ) -> bool {
910
916
let universe_a = self . scc_universes [ scc_a] ;
911
917
912
918
// Quick check: if scc_b's declared universe is a subset of
913
919
// scc_a's declared universe (typically, both are ROOT), then
914
920
// it cannot contain any problematic universe elements.
915
921
if universe_a. can_name ( self . scc_universes [ scc_b] ) {
916
- debug ! (
917
- "{universe_a:?} of {scc_a:?} can name declared universe {declared_universe:?} of {scc_b:?}" ,
918
- declared_universe = self . scc_universes[ scc_b]
919
- ) ;
920
922
return true ;
921
923
}
922
924
@@ -925,7 +927,9 @@ impl<'tcx> RegionInferenceContext<'tcx> {
925
927
// from universe_a
926
928
self . scc_values . placeholders_contained_in ( scc_b) . all ( |p| {
927
929
let universe_ok = universe_a. can_name ( p. universe ) ;
928
- debug ! ( "{universe_a:?} can name {:?} through {p:?}? {universe_ok:?}" , p. universe) ;
930
+ if !universe_ok {
931
+ debug ! ( "{universe_a:?} CANNOT NAME {:?} through {p:?}!" , p. universe) ;
932
+ }
929
933
universe_ok
930
934
} )
931
935
}
0 commit comments