1
Fork 0

Do not store stable crate id in on-disk hash map.

This commit is contained in:
Camille GILLOT 2023-12-24 12:41:35 +00:00
parent 75ad81ce93
commit 821920b2a3
4 changed files with 17 additions and 13 deletions

View file

@ -19,7 +19,9 @@ impl DefPathHashMapRef<'_> {
#[inline]
pub fn def_path_hash_to_def_index(&self, def_path_hash: &DefPathHash) -> DefIndex {
match *self {
DefPathHashMapRef::OwnedFromMetadata(ref map) => map.get(def_path_hash).unwrap(),
DefPathHashMapRef::OwnedFromMetadata(ref map) => {
map.get(&def_path_hash.local_hash()).unwrap()
}
DefPathHashMapRef::BorrowedFromTcx(_) => {
panic!("DefPathHashMap::BorrowedFromTcx variant only exists for serialization")
}