diff options
author | Jonas Schievink <[email protected]> | 2021-05-24 19:29:48 +0100 |
---|---|---|
committer | Jonas Schievink <[email protected]> | 2021-05-24 19:29:48 +0100 |
commit | 489ae7a800b02dbdacc1f949c067fa557333e7a1 (patch) | |
tree | 05fd003ccc166e52cf81e305a1073d56aed572ff /crates/hir_expand/src/db.rs | |
parent | 27bf62b70eeb6f4cb620be5630c4c4506be3539f (diff) |
Make `TokenTextRange` private
Diffstat (limited to 'crates/hir_expand/src/db.rs')
-rw-r--r-- | crates/hir_expand/src/db.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs index 5c769c1bf..03637878b 100644 --- a/crates/hir_expand/src/db.rs +++ b/crates/hir_expand/src/db.rs | |||
@@ -155,7 +155,7 @@ pub fn expand_hypothetical( | |||
155 | mbe::token_tree_to_syntax_node(&hypothetical_expansion.value, fragment_kind).ok()?; | 155 | mbe::token_tree_to_syntax_node(&hypothetical_expansion.value, fragment_kind).ok()?; |
156 | 156 | ||
157 | let token_id = macro_def.map_id_down(token_id); | 157 | let token_id = macro_def.map_id_down(token_id); |
158 | let range = tmap_2.range_by_token(token_id)?.by_kind(token_to_map.kind())?; | 158 | let range = tmap_2.range_by_token(token_id, token_to_map.kind())?; |
159 | let token = node.syntax_node().covering_element(range).into_token()?; | 159 | let token = node.syntax_node().covering_element(range).into_token()?; |
160 | Some((node.syntax_node(), token)) | 160 | Some((node.syntax_node(), token)) |
161 | } | 161 | } |