提交 7ea76068 编写于 作者: B Brian Koropoff

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
上级 0547a407
......@@ -502,7 +502,11 @@ fn node_ty(&self, id: ast::NodeId) -> mc::McResult<ty::t> {
}
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>> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册