aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/expand.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/expand.rs')
-rw-r--r--crates/ra_ide/src/expand.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ra_ide/src/expand.rs b/crates/ra_ide/src/expand.rs
index 2f1abf509..216d5cfec 100644
--- a/crates/ra_ide/src/expand.rs
+++ b/crates/ra_ide/src/expand.rs
@@ -1,13 +1,13 @@
1//! Utilities to work with files, produced by macros. 1//! Utilities to work with files, produced by macros.
2use std::iter::successors; 2use std::iter::successors;
3 3
4use hir::Source; 4use hir::InFile;
5use ra_db::FileId; 5use ra_db::FileId;
6use ra_syntax::{ast, AstNode, SyntaxNode, SyntaxToken}; 6use ra_syntax::{ast, AstNode, SyntaxNode, SyntaxToken};
7 7
8use crate::{db::RootDatabase, FileRange}; 8use crate::{db::RootDatabase, FileRange};
9 9
10pub(crate) fn original_range(db: &RootDatabase, node: Source<&SyntaxNode>) -> FileRange { 10pub(crate) fn original_range(db: &RootDatabase, node: InFile<&SyntaxNode>) -> FileRange {
11 let expansion = match node.file_id.expansion_info(db) { 11 let expansion = match node.file_id.expansion_info(db) {
12 None => { 12 None => {
13 return FileRange { 13 return FileRange {
@@ -44,8 +44,8 @@ pub(crate) fn descend_into_macros(
44 db: &RootDatabase, 44 db: &RootDatabase,
45 file_id: FileId, 45 file_id: FileId,
46 token: SyntaxToken, 46 token: SyntaxToken,
47) -> Source<SyntaxToken> { 47) -> InFile<SyntaxToken> {
48 let src = Source::new(file_id.into(), token); 48 let src = InFile::new(file_id.into(), token);
49 49
50 successors(Some(src), |token| { 50 successors(Some(src), |token| {
51 let macro_call = token.value.ancestors().find_map(ast::MacroCall::cast)?; 51 let macro_call = token.value.ancestors().find_map(ast::MacroCall::cast)?;