From e86d451484bf06a452a330af4b1b0c00de286715 Mon Sep 17 00:00:00 2001 From: Kartavya Vashishtha Date: Fri, 25 Nov 2022 12:20:34 +0530 Subject: [PATCH] fix token method call --- crates/ide/src/hover.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/ide/src/hover.rs b/crates/ide/src/hover.rs index cbf61efba05..016567311c8 100644 --- a/crates/ide/src/hover.rs +++ b/crates/ide/src/hover.rs @@ -176,7 +176,7 @@ pub(crate) fn hover( return None; } - let rest_pat = token.syntax().parent().and_then(ast::RestPat::cast)?; + let rest_pat = token.parent().and_then(ast::RestPat::cast)?; let record_pat_field_list = rest_pat.syntax().parent().and_then(ast::RecordPatFieldList::cast)?; let record_pat =