mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 21:35:20 +00:00
internal: Filter out opaque tokens in some of IDE feature macro descensions
This commit is contained in:
parent
ac4edbf9dc
commit
24d65bb7cf
11 changed files with 114 additions and 70 deletions
|
@ -529,9 +529,13 @@ impl<'a> FindUsages<'a> {
|
|||
})
|
||||
.into_iter()
|
||||
.flat_map(move |token| {
|
||||
sema.descend_into_macros_exact_if_in_macro(token)
|
||||
.into_iter()
|
||||
.filter_map(|it| it.parent())
|
||||
if sema.might_be_inside_macro_call(&token) {
|
||||
sema.descend_into_macros_exact(token)
|
||||
} else {
|
||||
<_>::from([token])
|
||||
}
|
||||
.into_iter()
|
||||
.filter_map(|it| it.parent())
|
||||
})
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue