Use def_path_hash_to_def_id
when re-using a RawDefId
Fixes #79890 Previously, we just copied a `RawDefId` from the 'old' map to the 'new' map. However, the `RawDefId` for a given `DefPathHash` may be different in the current compilation session. Using `def_path_hash_to_def_id` ensures that the `RawDefId` we use is valid in the current session.
This commit is contained in:
parent
d32c320d7e
commit
3918b82993
5 changed files with 32 additions and 6 deletions
|
@ -93,7 +93,7 @@ impl<'tcx> DepContext for TyCtxt<'tcx> {
|
|||
|
||||
fn register_reused_dep_path_hash(&self, hash: DefPathHash) {
|
||||
if let Some(cache) = self.queries.on_disk_cache.as_ref() {
|
||||
cache.register_reused_dep_path_hash(hash)
|
||||
cache.register_reused_dep_path_hash(*self, hash)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue