Do not double check for already decoded expn_id to avoid races

This commit is contained in:
Daria Sukhonina
2025-10-30 19:19:25 +03:00
parent 72fe2ffb39
commit 2a5d830bd6
@@ -1560,7 +1560,6 @@ fn def_path_hash_to_def_index(self, hash: DefPathHash) -> Option<DefIndex> {
}
fn expn_hash_to_expn_id(self, sess: &Session, index_guess: u32, hash: ExpnHash) -> ExpnId {
debug_assert_eq!(ExpnId::from_hash(hash), None);
let index_guess = ExpnIndex::from_u32(index_guess);
let old_hash = self.root.expn_hashes.get(self, index_guess).map(|lazy| lazy.decode(self));