Introduce some sanity checking assertions in trans, erase regions more aggressively.

This commit is contained in:
Niko Matsakis
2014-11-15 16:50:34 -05:00
parent 4ab0c588ff
commit 0b90cded14
11 changed files with 42 additions and 21 deletions

View File

@@ -137,8 +137,11 @@ pub fn trans_method_callee<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
}) => {
let trait_ref =
Rc::new(trait_ref.subst(bcx.tcx(),
&bcx.fcx.param_substs.substs));
bcx.fcx.param_substs.substs()));
let span = bcx.tcx().map.span(method_call.expr_id);
debug!("method_call={} trait_ref={}",
method_call,
trait_ref.repr(bcx.tcx()));
let origin = fulfill_obligation(bcx.ccx(),
span,
(*trait_ref).clone());