diff options
| author | jnyfah <jnyfaah@gmail.com> | 2025-02-07 10:50:45 +0100 |
|---|---|---|
| committer | jnyfah <jnyfaah@gmail.com> | 2025-02-07 10:50:45 +0100 |
| commit | d3b80e1d5009b269b1d04fbb23058954adf7d5c6 (patch) | |
| tree | ce13f461a87966d739283ae41b19d18cc9efc7bc /src/tools/rust-analyzer | |
| parent | 57b241532a605c9b531b755df4823e581ee715ca (diff) | |
| download | rust-d3b80e1d5009b269b1d04fbb23058954adf7d5c6.tar.gz rust-d3b80e1d5009b269b1d04fbb23058954adf7d5c6.zip | |
minor changes
Diffstat (limited to 'src/tools/rust-analyzer')
| -rw-r--r-- | src/tools/rust-analyzer/crates/ide/src/inlay_hints/bind_pat.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/rust-analyzer/crates/ide/src/inlay_hints/bind_pat.rs b/src/tools/rust-analyzer/crates/ide/src/inlay_hints/bind_pat.rs index 4d62561df7a..c2986a9aa66 100644 --- a/src/tools/rust-analyzer/crates/ide/src/inlay_hints/bind_pat.rs +++ b/src/tools/rust-analyzer/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()) |
