mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 22:01:37 +00:00
Fully remove old macro descension API
This commit is contained in:
parent
495118015e
commit
64064907ce
13 changed files with 66 additions and 103 deletions
|
@ -1,6 +1,6 @@
|
|||
use std::iter;
|
||||
|
||||
use hir::{db, DescendPreference, FilePosition, FileRange, HirFileId, InFile, Semantics};
|
||||
use hir::{db, FilePosition, FileRange, HirFileId, InFile, Semantics};
|
||||
use ide_db::{
|
||||
defs::{Definition, IdentClass},
|
||||
helpers::pick_best_token,
|
||||
|
@ -542,7 +542,7 @@ fn cover_range(r0: Option<TextRange>, r1: Option<TextRange>) -> Option<TextRange
|
|||
}
|
||||
|
||||
fn find_defs(sema: &Semantics<'_, RootDatabase>, token: SyntaxToken) -> FxHashSet<Definition> {
|
||||
sema.descend_into_macros(DescendPreference::None, token)
|
||||
sema.descend_into_macros_exact(token)
|
||||
.into_iter()
|
||||
.filter_map(|token| IdentClass::classify_token(sema, &token))
|
||||
.flat_map(IdentClass::definitions_no_ops)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue