From c46be83a346eb2559420c2c880a52e7ce1787dde Mon Sep 17 00:00:00 2001 From: kjeremy Date: Thu, 31 Oct 2019 13:29:56 -0400 Subject: Fixes #2143 --- crates/ra_hir/src/source_binder.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'crates/ra_hir/src') 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 { 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 { -- cgit v1.2.3