Add ExternCrateDecl to HIR

This commit is contained in:
Lukas Wirth 2023-08-02 11:52:55 +02:00
parent 151c750dac
commit bcff166b3a
39 changed files with 585 additions and 167 deletions

View file

@ -121,6 +121,12 @@ impl From<CrateRootModuleId> for ModuleDefId {
}
}
impl From<CrateId> for CrateRootModuleId {
fn from(krate: CrateId) -> Self {
CrateRootModuleId { krate }
}
}
impl TryFrom<ModuleId> for CrateRootModuleId {
type Error = ();