Filter out local_id == 0, those are already considered on the call site
This commit is contained in:
parent
14a64e0a55
commit
384189c3d9
@ -483,9 +483,13 @@ fn make_owner_info(&mut self, node: hir::OwnerNode<'hir>) -> hir::OwnerInfo<'hir
|
|||||||
let local_id_to_def_id = local_node_ids
|
let local_id_to_def_id = local_node_ids
|
||||||
.iter()
|
.iter()
|
||||||
.filter_map(|&node_id| {
|
.filter_map(|&node_id| {
|
||||||
let def_id = self.resolver.opt_local_def_id(node_id)?;
|
|
||||||
let hir_id = self.node_id_to_hir_id[node_id]?;
|
let hir_id = self.node_id_to_hir_id[node_id]?;
|
||||||
Some((hir_id.local_id, def_id))
|
if hir_id.local_id == hir::ItemLocalId::new(0) {
|
||||||
|
None
|
||||||
|
} else {
|
||||||
|
let def_id = self.resolver.opt_local_def_id(node_id)?;
|
||||||
|
Some((hir_id.local_id, def_id))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user