Monomorphize method types in Typer impl for BlockS

In some obscure circumstances, failure to do this can cause
unsubstituted type parameters to show up where they aren't
expected and cause an ICE.

Closes #18514
This commit is contained in:
Brian Koropoff 2014-11-01 14:59:22 -07:00
parent 0547a407aa
commit 7ea7606874

View file

@ -502,7 +502,11 @@ impl<'blk, 'tcx> mc::Typer<'tcx> for BlockS<'blk, 'tcx> {
}
fn node_method_ty(&self, method_call: typeck::MethodCall) -> Option<ty::t> {
self.tcx().method_map.borrow().find(&method_call).map(|method| method.ty)
self.tcx()
.method_map
.borrow()
.find(&method_call)
.map(|method| monomorphize_type(self, method.ty))
}
fn adjustments<'a>(&'a self) -> &'a RefCell<NodeMap<ty::AutoAdjustment>> {