Remove HirId -> LocalDefId
map from HIR.
This commit is contained in:
parent
3175d03d3b
commit
15d6325747
46 changed files with 321 additions and 382 deletions
|
@ -831,8 +831,6 @@ pub struct OwnerNodes<'tcx> {
|
|||
pub nodes: IndexVec<ItemLocalId, Option<ParentedNode<'tcx>>>,
|
||||
/// Content of local bodies.
|
||||
pub bodies: SortedMap<ItemLocalId, &'tcx Body<'tcx>>,
|
||||
/// Non-owning definitions contained in this owner.
|
||||
pub local_id_to_def_id: SortedMap<ItemLocalId, LocalDefId>,
|
||||
}
|
||||
|
||||
impl<'tcx> OwnerNodes<'tcx> {
|
||||
|
@ -862,7 +860,6 @@ impl fmt::Debug for OwnerNodes<'_> {
|
|||
.collect::<Vec<_>>(),
|
||||
)
|
||||
.field("bodies", &self.bodies)
|
||||
.field("local_id_to_def_id", &self.local_id_to_def_id)
|
||||
.field("hash_without_bodies", &self.hash_without_bodies)
|
||||
.field("hash_including_bodies", &self.hash_including_bodies)
|
||||
.finish()
|
||||
|
|
|
@ -100,13 +100,8 @@ impl<'tcx, HirCtx: crate::HashStableContext> HashStable<HirCtx> for OwnerNodes<'
|
|||
// `local_id_to_def_id` is also ignored because is dependent on the body, then just hashing
|
||||
// the body satisfies the condition of two nodes being different have different
|
||||
// `hash_stable` results.
|
||||
let OwnerNodes {
|
||||
hash_including_bodies,
|
||||
hash_without_bodies: _,
|
||||
nodes: _,
|
||||
bodies: _,
|
||||
local_id_to_def_id: _,
|
||||
} = *self;
|
||||
let OwnerNodes { hash_including_bodies, hash_without_bodies: _, nodes: _, bodies: _ } =
|
||||
*self;
|
||||
hash_including_bodies.hash_stable(hcx, hasher);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue