mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-23 21:23:20 +00:00
Rearrange logic of needs_par computation in print_let
True || needs_par_as_let_scrutinee(...) is always true.
This commit is contained in:
parent
8d64961589
commit
dc5ec724c0
@ -1166,8 +1166,11 @@ impl<'a> State<'a> {
|
||||
| ast::ExprKind::Closure(..)
|
||||
| ast::ExprKind::Ret(..)
|
||||
| ast::ExprKind::Yeet(..) => true,
|
||||
_ => parser::contains_exterior_struct_lit(expr),
|
||||
} || parser::needs_par_as_let_scrutinee(expr.precedence().order()),
|
||||
_ => {
|
||||
parser::contains_exterior_struct_lit(expr)
|
||||
|| parser::needs_par_as_let_scrutinee(expr.precedence().order())
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user