We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4904b2b commit 49dac40Copy full SHA for 49dac40
crates/ide/src/hover.rs
@@ -235,7 +235,11 @@ fn hover_type_fallback(
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()))?;
+ .find(|n| {
239
+ ast::Expr::can_cast(n.kind())
240
+ || ast::Pat::can_cast(n.kind())
241
+ || ast::Type::can_cast(n.kind())
242
+ })?;
243
244
let expr_or_pat = match_ast! {
245
match node {
0 commit comments