提交 808e039d 编写于 作者: P Piotr Czarnecki

Fix ICE with trans of calls to foreign fns

It was failing occasionally.
上级 10935de0
......@@ -141,8 +141,10 @@ fn trans_def<'a>(bcx: &'a Block<'a>, def: def::Def, ref_expr: &ast::Expr)
let expr_ty = node_id_type(bcx, ref_expr.id);
match def {
def::DefFn(did, _) if {
let def_id = inline::maybe_instantiate_inline(bcx.ccx(), did);
match bcx.tcx().map.find(def_id.node) {
let maybe_def_id = inline::get_local_instance(bcx.ccx(), did);
let maybe_ast_node = maybe_def_id.and_then(|def_id| bcx.tcx().map
.find(def_id.node));
match maybe_ast_node {
Some(ast_map::NodeStructCtor(_)) => true,
_ => false
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册