Squash closures and jumps into a single precedence level

This commit is contained in:
David Tolnay
2024-12-02 17:17:37 -08:00
parent f3ac64ac34
commit 193d82797c
4 changed files with 4 additions and 7 deletions

View File

@@ -1697,9 +1697,8 @@ pub struct Expr<'hir> {
impl Expr<'_> {
pub fn precedence(&self) -> ExprPrecedence {
match self.kind {
ExprKind::Closure { .. } => ExprPrecedence::Closure,
ExprKind::Break(..)
| ExprKind::Closure { .. }
| ExprKind::Continue(..)
| ExprKind::Ret(..)
| ExprKind::Yield(..)