Move CrateDefMap to hir_def

This commit is contained in:
Aleksey Kladov 2019-10-31 18:45:10 +03:00
parent f9f1effd01
commit ba2efca2bb
23 changed files with 824 additions and 731 deletions

View file

@ -253,8 +253,11 @@ impl SourceAnalyzer {
Some(res)
});
let items =
self.resolver.resolve_module_path(db, &path).take_types().map(PathResolution::Def);
let items = self
.resolver
.resolve_module_path(db, &path)
.take_types()
.map(|it| PathResolution::Def(it.into()));
types.or(values).or(items).or_else(|| {
self.resolver.resolve_path_as_macro(db, &path).map(|def| PathResolution::Macro(def))
})