We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4904b2b + 5698e51 commit c6a9fbfCopy full SHA for c6a9fbf
crates/ide/src/hover.rs
@@ -232,10 +232,12 @@ fn hover_type_fallback(
232
token: &SyntaxToken,
233
original_token: &SyntaxToken,
234
) -> Option<RangeInfo<HoverResult>> {
235
- let node = token
236
- .parent_ancestors()
237
- .take_while(|it| !ast::Item::can_cast(it.kind()))
238
- .find(|n| ast::Expr::can_cast(n.kind()) || ast::Pat::can_cast(n.kind()))?;
+ let node =
+ token.parent_ancestors().take_while(|it| !ast::Item::can_cast(it.kind())).find(|n| {
+ ast::Expr::can_cast(n.kind())
+ || ast::Pat::can_cast(n.kind())
239
+ || ast::Type::can_cast(n.kind())
240
+ })?;
241
242
let expr_or_pat = match_ast! {
243
match node {
0 commit comments