From 555b6d69b2420862388e36992d7e099625ca6fe4 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Fri, 17 Mar 2017 09:35:50 -0400 Subject: [PATCH] add some debug logs to type_variable.rs --- src/librustc/infer/type_variable.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/librustc/infer/type_variable.rs b/src/librustc/infer/type_variable.rs index 9c8419d9546..5aab0fdf6c9 100644 --- a/src/librustc/infer/type_variable.rs +++ b/src/librustc/infer/type_variable.rs @@ -30,6 +30,7 @@ pub struct TypeVariableTable<'tcx> { } /// Reasons to create a type inference variable +#[derive(Debug)] pub enum TypeVariableOrigin { MiscVariable(Span), NormalizeProjectionType(Span), @@ -196,6 +197,7 @@ pub fn new_var(&mut self, diverging: bool, origin: TypeVariableOrigin, default: Option>,) -> ty::TyVid { + debug!("new_var(diverging={:?}, origin={:?})", diverging, origin); self.eq_relations.new_key(()); let index = self.values.push(TypeVariableData { value: Bounded { relations: vec![], default: default }, @@ -203,7 +205,7 @@ pub fn new_var(&mut self, diverging: diverging }); let v = ty::TyVid { index: index as u32 }; - debug!("new_var() -> {:?}", v); + debug!("new_var: diverging={:?} index={:?}", diverging, v); v }