mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-28 14:03:35 +00:00
Correct node traversal to look at parent instead
Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
This commit is contained in:
parent
29951f9766
commit
f64feeb11a
1 changed files with 2 additions and 2 deletions
|
@ -176,8 +176,8 @@ pub(crate) fn hover(
|
|||
return None;
|
||||
}
|
||||
|
||||
let record_pat_field_list =
|
||||
token.parent_ancestors().find_map(ast::RecordPatFieldList::cast)?;
|
||||
let rest_pat = token.syntax().parent().and_then(ast::RestPat::cast)?;
|
||||
let record_pat_field_list = rest_pat.syntax().parent().and_then(ast::RecordPatFieldList::cast)?;
|
||||
|
||||
let record_pat =
|
||||
record_pat_field_list.syntax().parent().and_then(ast::RecordPat::cast)?;
|
||||
|
|
Loading…
Reference in a new issue