aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_analysis/src/extend_selection.rs
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2019-01-01 15:11:04 +0000
committerAleksey Kladov <[email protected]>2019-01-01 19:15:35 +0000
commitb2fec18098b6a99613012d185801fed72e424997 (patch)
tree5ee6cde2ebd31d18f8fda189ca3709a01fa65dee /crates/ra_analysis/src/extend_selection.rs
parent57030f587bb0bbe4dea9a97016b4e0f49a7ef5f3 (diff)
move more macros to hir
Diffstat (limited to 'crates/ra_analysis/src/extend_selection.rs')
-rw-r--r--crates/ra_analysis/src/extend_selection.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/ra_analysis/src/extend_selection.rs b/crates/ra_analysis/src/extend_selection.rs
index 62133ef29..f1b77f981 100644
--- a/crates/ra_analysis/src/extend_selection.rs
+++ b/crates/ra_analysis/src/extend_selection.rs
@@ -18,12 +18,12 @@ pub(crate) fn extend_selection(db: &RootDatabase, frange: FileRange) -> TextRang
18} 18}
19 19
20fn extend_selection_in_macro( 20fn extend_selection_in_macro(
21 db: &RootDatabase, 21 _db: &RootDatabase,
22 source_file: &SourceFileNode, 22 source_file: &SourceFileNode,
23 frange: FileRange, 23 frange: FileRange,
24) -> Option<TextRange> { 24) -> Option<TextRange> {
25 let macro_call = find_macro_call(source_file.syntax(), frange.range)?; 25 let macro_call = find_macro_call(source_file.syntax(), frange.range)?;
26 let (off, exp) = crate::macros::expand(db, frange.file_id, macro_call)?; 26 let (off, exp) = hir::MacroDef::ast_expand(macro_call)?;
27 let dst_range = exp.map_range_forward(frange.range - off)?; 27 let dst_range = exp.map_range_forward(frange.range - off)?;
28 let dst_range = ra_editor::extend_selection(exp.syntax().borrowed(), dst_range)?; 28 let dst_range = ra_editor::extend_selection(exp.syntax().borrowed(), dst_range)?;
29 let src_range = exp.map_range_back(dst_range)? + off; 29 let src_range = exp.map_range_back(dst_range)? + off;