mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 22:31:43 +00:00
Move CrateDefMap to hir_def
This commit is contained in:
parent
f9f1effd01
commit
ba2efca2bb
23 changed files with 824 additions and 731 deletions
|
@ -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))
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue