mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-29 10:58:02 +00:00
collapsing if statement
This commit is contained in:
parent
4522bf42ca
commit
6b328750e5
1 changed files with 2 additions and 4 deletions
|
|
@ -36,11 +36,9 @@ pub(super) fn hints(
|
|||
if it.ty().is_some() {
|
||||
return None;
|
||||
}
|
||||
if config.hide_closure_parameter_hints {
|
||||
if it.syntax().ancestors().any(|n| matches!(ast::Expr::cast(n), Some(ast::Expr::ClosureExpr(_)))) {
|
||||
if config.hide_closure_parameter_hints && it.syntax().ancestors().any(|n| matches!(ast::Expr::cast(n), Some(ast::Expr::ClosureExpr(_)))) {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
Some(it.colon_token())
|
||||
},
|
||||
ast::LetStmt(it) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue