Skip to content

Commit a49c9fb

Browse files
nikomatsakispnkfelix
authored andcommitted
include more universe information in debug! printouts
1 parent 378741b commit a49c9fb

File tree

3 files changed

+17
-5
lines changed

3 files changed

+17
-5
lines changed

src/librustc/infer/higher_ranked/mod.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,15 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
9696
let (result, map) = self.tcx.replace_bound_vars(binder, fld_r, fld_t);
9797

9898
debug!(
99-
"replace_bound_vars_with_placeholders(binder={:?}, result={:?}, map={:?})",
99+
"replace_bound_vars_with_placeholders(\
100+
next_universe={:?}, \
101+
binder={:?}, \
102+
result={:?}, \
103+
map={:?})",
104+
next_universe,
100105
binder,
101106
result,
102-
map
107+
map,
103108
);
104109

105110
(result, map)

src/librustc/infer/region_constraints/mod.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,8 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
514514
self.undo_log.push(AddVar(vid));
515515
}
516516
debug!(
517-
"created new region variable {:?} with origin {:?}",
518-
vid, origin
517+
"created new region variable {:?} in {:?} with origin {:?}",
518+
vid, universe, origin
519519
);
520520
return vid;
521521
}
@@ -671,6 +671,7 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
671671
self.make_subregion(origin, sup, sub);
672672

673673
if let (ty::ReVar(sub), ty::ReVar(sup)) = (*sub, *sup) {
674+
debug!("make_eqregion: uniying {:?} with {:?}", sub, sup);
674675
self.unification_table.union(sub, sup);
675676
self.any_unifications = true;
676677
}

src/librustc/infer/type_variable.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,13 @@ impl<'tcx> TypeVariableTable<'tcx> {
188188
});
189189
assert_eq!(eq_key.vid.index, index as u32);
190190

191-
debug!("new_var(index={:?}, diverging={:?}, origin={:?}", eq_key.vid, diverging, origin);
191+
debug!(
192+
"new_var(index={:?}, universe={:?}, diverging={:?}, origin={:?}",
193+
eq_key.vid,
194+
universe,
195+
diverging,
196+
origin,
197+
);
192198

193199
eq_key.vid
194200
}

0 commit comments

Comments
 (0)