Stop using CRATE_DEF_INDEX.

`CRATE_DEF_ID` and `CrateNum::as_def_id` are almost always what we want.
This commit is contained in:
Camille GILLOT 2022-04-15 19:27:53 +02:00
parent 878c7833f6
commit 07ee031763
30 changed files with 109 additions and 147 deletions

View file

@ -353,11 +353,6 @@ impl Definitions {
}
}
/// Retrieves the root definition.
pub fn get_root_def(&self) -> LocalDefId {
LocalDefId { local_def_index: CRATE_DEF_INDEX }
}
/// Adds a definition with a parent definition.
pub fn create_def(
&mut self,