Reduce use of local_def_id_to_hir_id.
This commit is contained in:
parent
ebcc847369
commit
67727aa7c3
39 changed files with 182 additions and 237 deletions
|
@ -173,8 +173,7 @@ fn compute_symbol_name<'tcx>(
|
|||
let stable_crate_id = tcx.sess.local_stable_crate_id();
|
||||
return tcx.sess.generate_proc_macro_decls_symbol(stable_crate_id);
|
||||
}
|
||||
let hir_id = tcx.hir().local_def_id_to_hir_id(def_id);
|
||||
matches!(tcx.hir().get(hir_id), Node::ForeignItem(_))
|
||||
matches!(tcx.hir().get_by_def_id(def_id), Node::ForeignItem(_))
|
||||
} else {
|
||||
tcx.is_foreign_item(def_id)
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue