aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir/src/source_binder.rs
diff options
context:
space:
mode:
authorarsdragonfly <[email protected]>2019-09-27 21:17:23 +0100
committerarsdragonfly <[email protected]>2019-09-27 21:17:23 +0100
commit84340db87aed477f61bf46ba5e4a75f3eb672237 (patch)
treeaf7fe4eb8045ccb1b73bcdcd80b3a729062bd308 /crates/ra_hir/src/source_binder.rs
parentd1988a17f4ceb90bcdaed79072c4b7f647c86854 (diff)
parent21fa889cf3f70c507e3b9f2f6362e65cbb8ed955 (diff)
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r--crates/ra_hir/src/source_binder.rs2
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 }