From 371961be0e0b0741599ebf3d9435c03fd45cf777 Mon Sep 17 00:00:00 2001 From: Edwin Cheng Date: Sat, 1 Jun 2019 19:34:19 +0800 Subject: Improve goto definition for MBE --- crates/ra_hir/src/source_binder.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'crates/ra_hir/src/source_binder.rs') diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs index 860e10069..75ed2de6c 100644 --- a/crates/ra_hir/src/source_binder.rs +++ b/crates/ra_hir/src/source_binder.rs @@ -283,8 +283,13 @@ impl SourceAnalyzer { self.infer.as_ref()?.field_resolution(expr_id) } - pub fn resolve_macro_call(&self, macro_call: &ast::MacroCall) -> Option { - let id = self.resolver.resolve_macro_call(macro_call.path().and_then(Path::from_ast))?; + pub fn resolve_macro_call( + &self, + db: &impl HirDatabase, + macro_call: &ast::MacroCall, + ) -> Option { + let id = + self.resolver.resolve_macro_call(db, macro_call.path().and_then(Path::from_ast))?; Some(MacroByExampleDef { id }) } -- cgit v1.2.3