1
Fork 0

Make index_hir incremental.

This commit is contained in:
Camille GILLOT 2021-02-28 20:23:10 +01:00
parent ed3c8e86cb
commit c09eaea484
6 changed files with 113 additions and 140 deletions

View file

@ -92,6 +92,12 @@ impl DefPathTable {
.iter_enumerated()
.map(move |(index, key)| (index, key, &self.def_path_hashes[index]))
}
pub fn all_def_path_hashes_and_def_ids(
&self,
) -> impl Iterator<Item = (&DefPathHash, DefIndex)> + '_ {
self.def_path_hashes.iter_enumerated().map(move |(index, hash)| (hash, index))
}
}
/// The definition table containing node definitions.