1
Fork 0

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:
Aaron Hill 2020-12-10 15:27:07 -05:00
parent d32c320d7e
commit 3918b82993
No known key found for this signature in database
GPG key ID: B4087E510E98B164
5 changed files with 32 additions and 6 deletions

View file

@ -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)
}
}