Skip to content

Commit

Permalink
Never parenthesize continue
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 3, 2024
1 parent 72ac961 commit fe06c5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_ast/src/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1325,7 +1325,6 @@ impl Expr {
}

ExprKind::Break(..)
| ExprKind::Continue(..)
| ExprKind::Ret(..)
| ExprKind::Yield(..)
| ExprKind::Yeet(..)
Expand Down Expand Up @@ -1359,6 +1358,7 @@ impl Expr {
| ExprKind::Block(..)
| ExprKind::Call(..)
| ExprKind::ConstBlock(_)
| ExprKind::Continue(..)
| ExprKind::Field(..)
| ExprKind::ForLoop { .. }
| ExprKind::FormatArgs(..)
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_hir/src/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,6 @@ impl Expr<'_> {
}

ExprKind::Break(..)
| ExprKind::Continue(..)
| ExprKind::Ret(..)
| ExprKind::Yield(..)
| ExprKind::Become(..) => ExprPrecedence::Jump,
Expand All @@ -1731,6 +1730,7 @@ impl Expr<'_> {
| ExprKind::Block(..)
| ExprKind::Call(..)
| ExprKind::ConstBlock(_)
| ExprKind::Continue(..)
| ExprKind::Field(..)
| ExprKind::If(..)
| ExprKind::Index(..)
Expand Down

0 comments on commit fe06c5d

Please sign in to comment.