diff options
Diffstat (limited to 'crates/ra_hir/src/source_binder.rs')
-rw-r--r-- | crates/ra_hir/src/source_binder.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 410064d45..876ebe0e3 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs | |||
@@ -267,9 +267,8 @@ impl SourceAnalyzer { | |||
267 | db: &impl HirDatabase, | 267 | db: &impl HirDatabase, |
268 | macro_call: &ast::MacroCall, | 268 | macro_call: &ast::MacroCall, |
269 | ) -> Option<MacroDef> { | 269 | ) -> Option<MacroDef> { |
270 | let id = | 270 | let path = macro_call.path().and_then(Path::from_ast)?; |
271 | self.resolver.resolve_macro_call(db, macro_call.path().and_then(Path::from_ast))?; | 271 | self.resolver.resolve_path_as_macro(db, &path) |
272 | Some(MacroDef { id }) | ||
273 | } | 272 | } |
274 | 273 | ||
275 | pub fn resolve_hir_path( | 274 | pub fn resolve_hir_path( |
@@ -277,7 +276,7 @@ impl SourceAnalyzer { | |||
277 | db: &impl HirDatabase, | 276 | db: &impl HirDatabase, |
278 | path: &crate::Path, | 277 | path: &crate::Path, |
279 | ) -> PerNs<crate::Resolution> { | 278 | ) -> PerNs<crate::Resolution> { |
280 | self.resolver.resolve_path(db, path) | 279 | self.resolver.resolve_path_without_assoc_items(db, path) |
281 | } | 280 | } |
282 | 281 | ||
283 | pub fn resolve_path(&self, db: &impl HirDatabase, path: &ast::Path) -> Option<PathResolution> { | 282 | pub fn resolve_path(&self, db: &impl HirDatabase, path: &ast::Path) -> Option<PathResolution> { |
@@ -294,7 +293,7 @@ impl SourceAnalyzer { | |||
294 | } | 293 | } |
295 | } | 294 | } |
296 | let hir_path = crate::Path::from_ast(path)?; | 295 | let hir_path = crate::Path::from_ast(path)?; |
297 | let res = self.resolver.resolve_path(db, &hir_path); | 296 | let res = self.resolver.resolve_path_without_assoc_items(db, &hir_path); |
298 | let res = res.clone().take_types().or_else(|| res.take_values())?; | 297 | let res = res.clone().take_types().or_else(|| res.take_values())?; |
299 | let res = match res { | 298 | let res = match res { |
300 | crate::Resolution::Def(it) => PathResolution::Def(it), | 299 | crate::Resolution::Def(it) => PathResolution::Def(it), |