mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Improve macro descension API
This commit is contained in:
parent
986577faaa
commit
5b8e386bae
21 changed files with 179 additions and 139 deletions
|
@ -1,4 +1,4 @@
|
|||
use hir::{AsAssocItem, Semantics};
|
||||
use hir::{AsAssocItem, DescendPreference, Semantics};
|
||||
use ide_db::{
|
||||
defs::{Definition, NameClass, NameRefClass},
|
||||
RootDatabase,
|
||||
|
@ -29,7 +29,7 @@ pub(crate) fn goto_declaration(
|
|||
.find(|it| matches!(it.kind(), IDENT | T![self] | T![super] | T![crate] | T![Self]))?;
|
||||
let range = original_token.text_range();
|
||||
let info: Vec<NavigationTarget> = sema
|
||||
.descend_into_macros(original_token, offset)
|
||||
.descend_into_macros(DescendPreference::None, original_token, offset)
|
||||
.iter()
|
||||
.filter_map(|token| {
|
||||
let parent = token.parent()?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue