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

@ -137,6 +137,9 @@ pub(crate) fn find_defs<'a>(
NameRefClass::FieldShorthand { local_ref, field_ref: _ } => {
Definition::Local(local_ref)
}
NameRefClass::ExternCrateShorthand { decl, .. } => {
Definition::ExternCrateDecl(decl)
}
}
}
ast::NameLike::Name(name) => match NameClass::classify(sema, &name)? {