Only allow feeding a value to newly created definitions.
This commit is contained in:
parent
9f2c6b0b09
commit
731c002b27
6 changed files with 47 additions and 33 deletions
|
@ -368,10 +368,6 @@ impl Definitions {
|
|||
LocalDefId { local_def_index: self.table.allocate(key, def_path_hash) }
|
||||
}
|
||||
|
||||
pub fn iter_local_def_id(&self) -> impl Iterator<Item = LocalDefId> + '_ {
|
||||
self.table.def_path_hashes.indices().map(|local_def_index| LocalDefId { local_def_index })
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn local_def_path_hash_to_def_id(
|
||||
&self,
|
||||
|
@ -389,6 +385,10 @@ impl Definitions {
|
|||
pub fn def_path_hash_to_def_index_map(&self) -> &DefPathHashMap {
|
||||
&self.table.def_path_hash_to_index
|
||||
}
|
||||
|
||||
pub fn num_definitions(&self) -> usize {
|
||||
self.table.def_path_hashes.len()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq, Debug)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue