Skip to content

Commit 7771120

Browse files
committed
Better universe debugging info
1 parent 32fd6e0 commit 7771120

File tree

1 file changed

+5
-6
lines changed
  • compiler/rustc_borrowck/src/region_infer

1 file changed

+5
-6
lines changed

compiler/rustc_borrowck/src/region_infer/mod.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -909,19 +909,18 @@ impl<'tcx> RegionInferenceContext<'tcx> {
909909
// scc_a's declared universe (typically, both are ROOT), then
910910
// it cannot contain any problematic universe elements.
911911
if universe_a.can_name(self.scc_universes[scc_b]) {
912+
debug!("{universe_a:?} of {scc_a:?} can name declared universe {declared_universe:?} of {scc_b:?}",
913+
declared_universe = self.scc_universes[scc_b]);
912914
return true;
913915
}
914916

915917
// Otherwise, we have to iterate over the universe elements in
916918
// B's value, and check whether all of them are nameable
917919
// from universe_a
918920
self.scc_values.placeholders_contained_in(scc_b).all(|p| {
919-
if universe_a.can_name(p.universe) {
920-
true
921-
} else {
922-
debug!("{universe_a:?} cannot name {:?} through {p:?}", p.universe);
923-
false
924-
}
921+
let universe_ok = universe_a.can_name(p.universe);
922+
debug!("{universe_a:?} can name {:?} through {p:?}? {universe_ok:?}", p.universe);
923+
universe_ok
925924
})
926925
}
927926

0 commit comments

Comments
 (0)