simplify ancestor climbing to not consider macros

This commit is contained in:
Kartavya Vashishtha 2022-11-19 11:17:43 +05:30
parent 0ffb361eb9
commit a778203db9
No known key found for this signature in database
GPG key ID: A50012C2324E5DF0

View file

@ -257,7 +257,7 @@ pub(super) fn struct_rest_pat(
) -> Option<HoverResult> {
let pat = expr_or_pat.as_ref().right()?;
let mut ancestors = sema.ancestors_with_macros(pat.syntax().clone());
let mut ancestors = pat.syntax().ancestors();
let _record_pat_field_list = ancestors.next()?;
let record_pat = ancestors.next()?;
let pattern = sema