From a49c9fb8c37081dca139834d4f7d336b443e6d0b Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 1 Feb 2019 10:34:42 -0500 Subject: [PATCH] include more universe information in `debug!` printouts --- src/librustc/infer/higher_ranked/mod.rs | 9 +++++++-- src/librustc/infer/region_constraints/mod.rs | 5 +++-- src/librustc/infer/type_variable.rs | 8 +++++++- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/src/librustc/infer/higher_ranked/mod.rs b/src/librustc/infer/higher_ranked/mod.rs index 7f01078737d..c864349019b 100644 --- a/src/librustc/infer/higher_ranked/mod.rs +++ b/src/librustc/infer/higher_ranked/mod.rs @@ -96,10 +96,15 @@ pub fn replace_bound_vars_with_placeholders( 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) diff --git a/src/librustc/infer/region_constraints/mod.rs b/src/librustc/infer/region_constraints/mod.rs index 65d25333c71..4ab1c1699b3 100644 --- a/src/librustc/infer/region_constraints/mod.rs +++ b/src/librustc/infer/region_constraints/mod.rs @@ -514,8 +514,8 @@ pub fn new_region_var( 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; } @@ -671,6 +671,7 @@ pub fn make_eqregion( 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; } diff --git a/src/librustc/infer/type_variable.rs b/src/librustc/infer/type_variable.rs index 09a0a6ce9c9..4c76818346b 100644 --- a/src/librustc/infer/type_variable.rs +++ b/src/librustc/infer/type_variable.rs @@ -188,7 +188,13 @@ pub fn new_var(&mut self, }); 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 }