diff options
Diffstat (limited to 'crates/ra_hir_expand/src/db.rs')
-rw-r--r-- | crates/ra_hir_expand/src/db.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/crates/ra_hir_expand/src/db.rs b/crates/ra_hir_expand/src/db.rs index d83c391a9..c275f6b01 100644 --- a/crates/ra_hir_expand/src/db.rs +++ b/crates/ra_hir_expand/src/db.rs | |||
@@ -5,7 +5,7 @@ use std::sync::Arc; | |||
5 | use mbe::{ExpandResult, MacroRules}; | 5 | use mbe::{ExpandResult, MacroRules}; |
6 | use parser::FragmentKind; | 6 | use parser::FragmentKind; |
7 | use ra_db::{salsa, SourceDatabase}; | 7 | use ra_db::{salsa, SourceDatabase}; |
8 | use ra_syntax::{algo::diff, AstNode, GreenNode, Parse, SyntaxKind::*, SyntaxNode}; | 8 | use syntax::{algo::diff, AstNode, GreenNode, Parse, SyntaxKind::*, SyntaxNode}; |
9 | 9 | ||
10 | use crate::{ | 10 | use crate::{ |
11 | ast_id_map::AstIdMap, BuiltinDeriveExpander, BuiltinFnLikeExpander, EagerCallLoc, EagerMacroId, | 11 | ast_id_map::AstIdMap, BuiltinDeriveExpander, BuiltinFnLikeExpander, EagerCallLoc, EagerMacroId, |
@@ -92,9 +92,9 @@ pub trait AstDatabase: SourceDatabase { | |||
92 | pub fn expand_hypothetical( | 92 | pub fn expand_hypothetical( |
93 | db: &dyn AstDatabase, | 93 | db: &dyn AstDatabase, |
94 | actual_macro_call: MacroCallId, | 94 | actual_macro_call: MacroCallId, |
95 | hypothetical_args: &ra_syntax::ast::TokenTree, | 95 | hypothetical_args: &syntax::ast::TokenTree, |
96 | token_to_map: ra_syntax::SyntaxToken, | 96 | token_to_map: syntax::SyntaxToken, |
97 | ) -> Option<(SyntaxNode, ra_syntax::SyntaxToken)> { | 97 | ) -> Option<(SyntaxNode, syntax::SyntaxToken)> { |
98 | let macro_file = MacroFile { macro_call_id: actual_macro_call }; | 98 | let macro_file = MacroFile { macro_call_id: actual_macro_call }; |
99 | let (tt, tmap_1) = mbe::syntax_node_to_token_tree(hypothetical_args.syntax()).unwrap(); | 99 | let (tt, tmap_1) = mbe::syntax_node_to_token_tree(hypothetical_args.syntax()).unwrap(); |
100 | let range = | 100 | let range = |
@@ -105,7 +105,7 @@ pub fn expand_hypothetical( | |||
105 | parse_macro_with_arg(db, macro_file, Some(std::sync::Arc::new((tt, tmap_1))))?; | 105 | parse_macro_with_arg(db, macro_file, Some(std::sync::Arc::new((tt, tmap_1))))?; |
106 | let token_id = macro_def.0.map_id_down(token_id); | 106 | let token_id = macro_def.0.map_id_down(token_id); |
107 | let range = tmap_2.range_by_token(token_id)?.by_kind(token_to_map.kind())?; | 107 | let range = tmap_2.range_by_token(token_id)?.by_kind(token_to_map.kind())?; |
108 | let token = ra_syntax::algo::find_covering_element(&node.syntax_node(), range).into_token()?; | 108 | let token = syntax::algo::find_covering_element(&node.syntax_node(), range).into_token()?; |
109 | Some((node.syntax_node(), token)) | 109 | Some((node.syntax_node(), token)) |
110 | } | 110 | } |
111 | 111 | ||