From d2c38aa6eb8d1cb5306f259a946bc0c1261e4382 Mon Sep 17 00:00:00 2001 From: Ben Gamari Date: Thu, 10 Jul 2014 15:30:49 -0400 Subject: [PATCH] middle::typeck::collect: Add debug output for lifetimes --- src/librustc/middle/typeck/collect.rs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/librustc/middle/typeck/collect.rs b/src/librustc/middle/typeck/collect.rs index 9f08dc2c924..7a39dd5b5ab 100644 --- a/src/librustc/middle/typeck/collect.rs +++ b/src/librustc/middle/typeck/collect.rs @@ -1018,16 +1018,17 @@ fn ty_generics(ccx: &CrateCtxt, let mut result = base_generics; for (i, l) in lifetimes.iter().enumerate() { - result.regions.push(space, - ty::RegionParameterDef { name: l.name, - space: space, - index: i, - def_id: local_def(l.id) }); + let def = ty::RegionParameterDef { name: l.name, + space: space, + index: i, + def_id: local_def(l.id) }; + debug!("ty_generics: def for region param: {}", def); + result.regions.push(space, def); } for (i, param) in types.iter().enumerate() { let def = get_or_create_type_parameter_def(ccx, space, param, i); - debug!("def for param: {}", def.repr(ccx.tcx)); + debug!("ty_generics: def for type param: {}", def.repr(ccx.tcx)); result.types.push(space, def); }