mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +00:00
Saw a FIXME comment and decided to fix it.
This renames `descend_into_macros` to `descend_into_macros_single` and `descend_into_macros_many` into `descend_into_macros`. However, this does not touch a function in `SemanticsImpl` of same name.
This commit is contained in:
parent
64b1c72af2
commit
eccfa1645b
16 changed files with 20 additions and 22 deletions
|
@ -142,8 +142,8 @@ fn extend_tokens_from_range(
|
|||
|
||||
// compute original mapped token range
|
||||
let extended = {
|
||||
let fst_expanded = sema.descend_into_macros(first_token.clone());
|
||||
let lst_expanded = sema.descend_into_macros(last_token.clone());
|
||||
let fst_expanded = sema.descend_into_macros_single(first_token.clone());
|
||||
let lst_expanded = sema.descend_into_macros_single(last_token.clone());
|
||||
let mut lca =
|
||||
algo::least_common_ancestor(&fst_expanded.parent()?, &lst_expanded.parent()?)?;
|
||||
lca = shallowest_node(&lca);
|
||||
|
@ -155,7 +155,7 @@ fn extend_tokens_from_range(
|
|||
|
||||
// Compute parent node range
|
||||
let validate = |token: &SyntaxToken| -> bool {
|
||||
let expanded = sema.descend_into_macros(token.clone());
|
||||
let expanded = sema.descend_into_macros_single(token.clone());
|
||||
let parent = match expanded.parent() {
|
||||
Some(it) => it,
|
||||
None => return false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue