aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand/src/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/hir_expand/src/lib.rs')
-rw-r--r--crates/hir_expand/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/hir_expand/src/lib.rs b/crates/hir_expand/src/lib.rs
index 3fa1b1d77..e388ddacc 100644
--- a/crates/hir_expand/src/lib.rs
+++ b/crates/hir_expand/src/lib.rs
@@ -22,7 +22,7 @@ use std::sync::Arc;
22 22
23use base_db::{impl_intern_key, salsa, CrateId, FileId, FileRange}; 23use base_db::{impl_intern_key, salsa, CrateId, FileId, FileRange};
24use syntax::{ 24use syntax::{
25 algo::{self, skip_trivia_token}, 25 algo::skip_trivia_token,
26 ast::{self, AstNode}, 26 ast::{self, AstNode},
27 Direction, SyntaxNode, SyntaxToken, TextRange, TextSize, 27 Direction, SyntaxNode, SyntaxToken, TextRange, TextSize,
28}; 28};
@@ -335,7 +335,7 @@ impl ExpansionInfo {
335 335
336 let range = self.exp_map.range_by_token(token_id)?.by_kind(token.value.kind())?; 336 let range = self.exp_map.range_by_token(token_id)?.by_kind(token.value.kind())?;
337 337
338 let token = algo::find_covering_element(&self.expanded.value, range).into_token()?; 338 let token = self.expanded.value.covering_element(range).into_token()?;
339 339
340 Some(self.expanded.with_value(token)) 340 Some(self.expanded.with_value(token))
341 } 341 }
@@ -360,8 +360,8 @@ impl ExpansionInfo {
360 }; 360 };
361 361
362 let range = token_map.range_by_token(token_id)?.by_kind(token.value.kind())?; 362 let range = token_map.range_by_token(token_id)?.by_kind(token.value.kind())?;
363 let token = algo::find_covering_element(&tt.value, range + tt.value.text_range().start()) 363 let token =
364 .into_token()?; 364 tt.value.covering_element(range + tt.value.text_range().start()).into_token()?;
365 Some((tt.with_value(token), origin)) 365 Some((tt.with_value(token), origin))
366 } 366 }
367} 367}