Store hir_id_to_def_id in OwnerInfo.
This commit is contained in:
parent
17dfae79bb
commit
80132c3ce4
5 changed files with 31 additions and 19 deletions
|
@ -204,8 +204,11 @@ impl<'hir> Map<'hir> {
|
|||
if hir_id.local_id == ItemLocalId::new(0) {
|
||||
Some(hir_id.owner)
|
||||
} else {
|
||||
// FIXME(#85914) is this access safe for incr. comp.?
|
||||
self.tcx.untracked_resolutions.definitions.opt_hir_id_to_local_def_id(hir_id)
|
||||
self.tcx
|
||||
.hir_owner_nodes(hir_id.owner)?
|
||||
.local_id_to_def_id
|
||||
.get(&hir_id.local_id)
|
||||
.copied()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue