Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/syntax/src/ast/prec.rs')
-rw-r--r--crates/syntax/src/ast/prec.rs24
1 files changed, 12 insertions, 12 deletions
diff --git a/crates/syntax/src/ast/prec.rs b/crates/syntax/src/ast/prec.rs
index 00750bff0b..1364adb187 100644
--- a/crates/syntax/src/ast/prec.rs
+++ b/crates/syntax/src/ast/prec.rs
@@ -276,19 +276,19 @@ impl Expr {
}
// Not every expression can be followed by `else` in the `let-else`
- if let Some(ast::Stmt::LetStmt(e)) = stmt {
- if e.let_else().is_some() {
- match self {
- BinExpr(e)
- if e.op_kind()
- .map(|op| matches!(op, BinaryOp::LogicOp(_)))
- .unwrap_or(false) =>
- {
- return true;
- }
- _ if self.clone().trailing_brace().is_some() => return true,
- _ => {}
+ if let Some(ast::Stmt::LetStmt(e)) = stmt
+ && e.let_else().is_some()
+ {
+ match self {
+ BinExpr(e)
+ if e.op_kind()
+ .map(|op| matches!(op, BinaryOp::LogicOp(_)))
+ .unwrap_or(false) =>
+ {
+ return true;
}
+ _ if self.clone().trailing_brace().is_some() => return true,
+ _ => {}
}
}