diff options
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index bd4be8430..6e89bfc76 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -203,6 +203,7 @@ impl SourceAnalyzer { | |||
203 | db: &impl HirDatabase, | 203 | db: &impl HirDatabase, |
204 | macro_call: &ast::MacroCall, | 204 | macro_call: &ast::MacroCall, |
205 | ) -> Option<MacroDef> { | 205 | ) -> Option<MacroDef> { |
206 | // This must be a normal source file rather than macro file. | ||
206 | let path = macro_call.path().and_then(Path::from_ast)?; | 207 | let path = macro_call.path().and_then(Path::from_ast)?; |
207 | self.resolver.resolve_path_as_macro(db, &path) | 208 | self.resolver.resolve_path_as_macro(db, &path) |
208 | } | 209 | } |
@@ -261,6 +262,7 @@ impl SourceAnalyzer { | |||
261 | return Some(PathResolution::AssocItem(assoc)); | 262 | return Some(PathResolution::AssocItem(assoc)); |
262 | } | 263 | } |
263 | } | 264 | } |
265 | // This must be a normal source file rather than macro file. | ||
264 | let hir_path = crate::Path::from_ast(path.clone())?; | 266 | let hir_path = crate::Path::from_ast(path.clone())?; |
265 | self.resolve_hir_path(db, &hir_path) | 267 | self.resolve_hir_path(db, &hir_path) |
266 | } | 268 | } |