mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Improve macro descension API
This commit is contained in:
parent
986577faaa
commit
5b8e386bae
21 changed files with 179 additions and 139 deletions
|
@ -4,7 +4,10 @@
|
|||
use std::collections::BTreeSet;
|
||||
|
||||
use either::Either;
|
||||
use hir::{AssocItem, GenericParam, HirDisplay, ModuleDef, PathResolution, Semantics, Trait};
|
||||
use hir::{
|
||||
AssocItem, DescendPreference, GenericParam, HirDisplay, ModuleDef, PathResolution, Semantics,
|
||||
Trait,
|
||||
};
|
||||
use ide_db::{
|
||||
active_parameter::{callable_for_node, generic_def_for_node},
|
||||
base_db::FilePosition,
|
||||
|
@ -79,7 +82,7 @@ pub(crate) fn signature_help(
|
|||
// if the cursor is sandwiched between two space tokens and the call is unclosed
|
||||
// this prevents us from leaving the CallExpression
|
||||
.and_then(|tok| algo::skip_trivia_token(tok, Direction::Prev))?;
|
||||
let token = sema.descend_into_macros_single(token, offset);
|
||||
let token = sema.descend_into_macros_single(DescendPreference::None, token, offset);
|
||||
|
||||
for node in token.parent_ancestors() {
|
||||
match_ast! {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue