diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-01 18:48:06 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-01 18:48:06 +0100 |
commit | ccec71165bf1f8f79bd2d2a5c05bed55ff3a07a2 (patch) | |
tree | 695718725ac4c9fb60a6c5c29a4f83aa489cc6c2 /crates/ra_hir/src/expr.rs | |
parent | 1e6b45b05ae378b9e376fcf02ecef15aa7dd1b6b (diff) | |
parent | 371961be0e0b0741599ebf3d9435c03fd45cf777 (diff) |
Merge #1360
1360: Improve goto definition for MBE r=matklad a=edwin0cheng
This PR improve the macro resolution for goto definition and expression macro invocation by using proper path resolution for external macros.
Co-authored-by: Edwin Cheng <[email protected]>
Diffstat (limited to 'crates/ra_hir/src/expr.rs')
-rw-r--r-- | crates/ra_hir/src/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_hir/src/expr.rs b/crates/ra_hir/src/expr.rs index 9618236e5..51913d37b 100644 --- a/crates/ra_hir/src/expr.rs +++ b/crates/ra_hir/src/expr.rs | |||
@@ -828,7 +828,7 @@ where | |||
828 | .ast_id(e) | 828 | .ast_id(e) |
829 | .with_file_id(self.current_file_id); | 829 | .with_file_id(self.current_file_id); |
830 | 830 | ||
831 | if let Some(def) = self.resolver.resolve_macro_call(path) { | 831 | if let Some(def) = self.resolver.resolve_macro_call(self.db, path) { |
832 | let call_id = MacroCallLoc { def, ast_id }.id(self.db); | 832 | let call_id = MacroCallLoc { def, ast_id }.id(self.db); |
833 | let file_id = call_id.as_file(MacroFileKind::Expr); | 833 | let file_id = call_id.as_file(MacroFileKind::Expr); |
834 | if let Some(node) = self.db.parse_or_expand(file_id) { | 834 | if let Some(node) = self.db.parse_or_expand(file_id) { |