Skip to content

Commit

Permalink
include more universe information in debug! printouts
Browse files Browse the repository at this point in the history
  • Loading branch information
nikomatsakis authored and pnkfelix committed Feb 15, 2019
1 parent 378741b commit a49c9fb
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 5 deletions.
9 changes: 7 additions & 2 deletions src/librustc/infer/higher_ranked/mod.rs
Expand Up @@ -96,10 +96,15 @@ impl<'a, 'gcx, 'tcx> InferCtxt<'a, 'gcx, 'tcx> {
let (result, map) = self.tcx.replace_bound_vars(binder, fld_r, fld_t);

debug!(
"replace_bound_vars_with_placeholders(binder={:?}, result={:?}, map={:?})",
"replace_bound_vars_with_placeholders(\
next_universe={:?}, \
binder={:?}, \
result={:?}, \
map={:?})",
next_universe,
binder,
result,
map
map,
);

(result, map)
Expand Down
5 changes: 3 additions & 2 deletions src/librustc/infer/region_constraints/mod.rs
Expand Up @@ -514,8 +514,8 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
self.undo_log.push(AddVar(vid));
}
debug!(
"created new region variable {:?} with origin {:?}",
vid, origin
"created new region variable {:?} in {:?} with origin {:?}",
vid, universe, origin
);
return vid;
}
Expand Down Expand Up @@ -671,6 +671,7 @@ impl<'tcx> RegionConstraintCollector<'tcx> {
self.make_subregion(origin, sup, sub);

if let (ty::ReVar(sub), ty::ReVar(sup)) = (*sub, *sup) {
debug!("make_eqregion: uniying {:?} with {:?}", sub, sup);
self.unification_table.union(sub, sup);
self.any_unifications = true;
}
Expand Down
8 changes: 7 additions & 1 deletion src/librustc/infer/type_variable.rs
Expand Up @@ -188,7 +188,13 @@ impl<'tcx> TypeVariableTable<'tcx> {
});
assert_eq!(eq_key.vid.index, index as u32);

debug!("new_var(index={:?}, diverging={:?}, origin={:?}", eq_key.vid, diverging, origin);
debug!(
"new_var(index={:?}, universe={:?}, diverging={:?}, origin={:?}",
eq_key.vid,
universe,
diverging,
origin,
);

eq_key.vid
}
Expand Down

0 comments on commit a49c9fb

Please sign in to comment.