diff options
| author | David Tolnay <dtolnay@gmail.com> | 2024-12-02 17:50:12 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2024-12-02 17:50:12 -0800 |
| commit | fe06c5dce1db564d42678ea8e4f4a8ae451fe4a3 (patch) | |
| tree | 0cec7115dae2b1283a4999a4fe6740d3dcbdc653 | |
| parent | 72ac961616f23401c54f08436006250fd1fcdb9e (diff) | |
| download | rust-fe06c5dce1db564d42678ea8e4f4a8ae451fe4a3.tar.gz rust-fe06c5dce1db564d42678ea8e4f4a8ae451fe4a3.zip | |
Never parenthesize `continue`
| -rw-r--r-- | compiler/rustc_ast/src/ast.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_hir/src/hir.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_ast/src/ast.rs b/compiler/rustc_ast/src/ast.rs index 482efa132ab..d7d4a821ef6 100644 --- a/compiler/rustc_ast/src/ast.rs +++ b/compiler/rustc_ast/src/ast.rs @@ -1325,7 +1325,6 @@ impl Expr { } ExprKind::Break(..) - | ExprKind::Continue(..) | ExprKind::Ret(..) | ExprKind::Yield(..) | ExprKind::Yeet(..) @@ -1359,6 +1358,7 @@ impl Expr { | ExprKind::Block(..) | ExprKind::Call(..) | ExprKind::ConstBlock(_) + | ExprKind::Continue(..) | ExprKind::Field(..) | ExprKind::ForLoop { .. } | ExprKind::FormatArgs(..) diff --git a/compiler/rustc_hir/src/hir.rs b/compiler/rustc_hir/src/hir.rs index 21fa11fbc0a..2a7df6827e4 100644 --- a/compiler/rustc_hir/src/hir.rs +++ b/compiler/rustc_hir/src/hir.rs @@ -1705,7 +1705,6 @@ impl Expr<'_> { } ExprKind::Break(..) - | ExprKind::Continue(..) | ExprKind::Ret(..) | ExprKind::Yield(..) | ExprKind::Become(..) => ExprPrecedence::Jump, @@ -1731,6 +1730,7 @@ impl Expr<'_> { | ExprKind::Block(..) | ExprKind::Call(..) | ExprKind::ConstBlock(_) + | ExprKind::Continue(..) | ExprKind::Field(..) | ExprKind::If(..) | ExprKind::Index(..) |
