mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 14:21:44 +00:00
Fixes #2143
This commit is contained in:
parent
5451bfb9a1
commit
c46be83a34
2 changed files with 22 additions and 1 deletions
|
@ -255,7 +255,9 @@ impl SourceAnalyzer {
|
|||
|
||||
let items =
|
||||
self.resolver.resolve_module_path(db, &path).take_types().map(PathResolution::Def);
|
||||
types.or(values).or(items)
|
||||
types.or(values).or(items).or_else(|| {
|
||||
self.resolver.resolve_path_as_macro(db, &path).map(|def| PathResolution::Macro(def))
|
||||
})
|
||||
}
|
||||
|
||||
pub fn resolve_path(&self, db: &impl HirDatabase, path: &ast::Path) -> Option<PathResolution> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue