Unnamed repository; edit this file 'description' to name the repository.
minor changes
jnyfah 2025-02-07
parent 6b32875 · commit 7d1fedc
-rw-r--r--crates/ide/src/inlay_hints/bind_pat.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/inlay_hints/bind_pat.rs b/crates/ide/src/inlay_hints/bind_pat.rs
index 4d62561df7..c2986a9aa6 100644
--- a/crates/ide/src/inlay_hints/bind_pat.rs
+++ b/crates/ide/src/inlay_hints/bind_pat.rs
@@ -36,7 +36,7 @@ pub(super) fn hints(
if it.ty().is_some() {
return None;
}
- if config.hide_closure_parameter_hints && it.syntax().ancestors().any(|n| matches!(ast::Expr::cast(n), Some(ast::Expr::ClosureExpr(_)))) {
+ if config.hide_closure_parameter_hints && it.syntax().ancestors().nth(2).is_none_or(|n| matches!(ast::Expr::cast(n), Some(ast::Expr::ClosureExpr(_)))) {
return None;
}
Some(it.colon_token())