aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_expand/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_hir_expand/src')
-rw-r--r--crates/ra_hir_expand/src/db.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs
index 72c728c93..e2860371f 100644
--- a/crates/ra_hir_expand/src/db.rs
+++ b/crates/ra_hir_expand/src/db.rs
@@ -151,8 +151,7 @@ pub(crate) fn parse_macro_with_info(
151 let arg_start = arg_tt.map(|t| t.syntax().text_range().start()); 151 let arg_start = arg_tt.map(|t| t.syntax().text_range().start());
152 let def_start = def_tt.map(|t| t.syntax().text_range().start()); 152 let def_start = def_tt.map(|t| t.syntax().text_range().start());
153 153
154 let macro_rules = db.macro_def(loc.def).ok_or("Fail to find macro definition").ok()?.0; 154 let shift = db.macro_def(loc.def)?.0.shift();
155 let shift = macro_rules.shift();
156 155
157 let arg_map = arg_start 156 let arg_map = arg_start
158 .map(|start| exp_map.map_ranges(&expand_info.arg_map, start, shift)) 157 .map(|start| exp_map.map_ranges(&expand_info.arg_map, start, shift))