We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 10935de commit 808e039Copy full SHA for 808e039
src/librustc/middle/trans/callee.rs
@@ -141,8 +141,10 @@ fn trans<'a>(bcx: &'a Block<'a>, expr: &ast::Expr) -> Callee<'a> {
141
let expr_ty = node_id_type(bcx, ref_expr.id);
142
match def {
143
def::DefFn(did, _) if {
144
- let def_id = inline::maybe_instantiate_inline(bcx.ccx(), did);
145
- 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
146
+ .find(def_id.node));
147
+ match maybe_ast_node {
148
Some(ast_map::NodeStructCtor(_)) => true,
149
_ => false
150
}
0 commit comments