aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2019-11-01 13:59:59 +0000
committerGitHub <[email protected]>2019-11-01 13:59:59 +0000
commit363718ba42d1eb906577a0a03c14248a0962a06a (patch)
tree9bb11467a2a4411218a36d2c61a59e844f3fdf01 /crates/ra_hir/src
parent5451bfb9a1c6482822bdd7883434b9230affd2ea (diff)
parentc46be83a346eb2559420c2c880a52e7ce1787dde (diff)
Merge #2147
2147: Fixes #2143 r=matklad a=kjeremy Co-authored-by: kjeremy <[email protected]>
Diffstat (limited to 'crates/ra_hir/src')
-rw-r--r--crates/ra_hir/src/source_binder.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
index 152bc71bd..0008cb232 100644
--- a/crates/ra_hir/src/source_binder.rs
+++ b/crates/ra_hir/src/source_binder.rs
@@ -255,7 +255,9 @@ impl SourceAnalyzer {
255 255
256 let items = 256 let items =
257 self.resolver.resolve_module_path(db, &path).take_types().map(PathResolution::Def); 257 self.resolver.resolve_module_path(db, &path).take_types().map(PathResolution::Def);
258 types.or(values).or(items) 258 types.or(values).or(items).or_else(|| {
259 self.resolver.resolve_path_as_macro(db, &path).map(|def| PathResolution::Macro(def))
260 })
259 } 261 }
260 262
261 pub fn resolve_path(&self, db: &impl HirDatabase, path: &ast::Path) -> Option<PathResolution> { 263 pub fn resolve_path(&self, db: &impl HirDatabase, path: &ast::Path) -> Option<PathResolution> {