internal: Filter out opaque tokens in some of IDE feature macro descensions

This commit is contained in:
Lukas Wirth 2024-10-04 11:08:11 +02:00
parent ac4edbf9dc
commit 24d65bb7cf
11 changed files with 114 additions and 70 deletions

View file

@ -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)
.descend_into_macros_no_opaque(original_token)
.iter()
.filter_map(|token| {
let parent = token.parent()?;