diff options
| author | Ben Kimock <kimockb@gmail.com> | 2025-09-03 05:34:15 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-03 05:34:15 +0000 |
| commit | 5f3197ffb11cc263efd31475781ef98c53750cb4 (patch) | |
| tree | 5783612df63a41809930ecf425792bcaad347e22 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 80c3ba803f15b124fdba2c93d2d167b88abb1e77 (diff) | |
| parent | d98a9c6931559f4b40a1913e74f3eb95c32c113c (diff) | |
| download | rust-5f3197ffb11cc263efd31475781ef98c53750cb4.tar.gz rust-5f3197ffb11cc263efd31475781ef98c53750cb4.zip | |
Merge pull request #4560 from rust-lang/rustup-2025-09-03
Automatic Rustup
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 7de4f6efd0b..9b09cbba7af 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -2910,7 +2910,8 @@ impl<'a> Parser<'a> { } } - fn parse_for_head(&mut self) -> PResult<'a, (Box<Pat>, Box<Expr>)> { + // Public to use it for custom `for` expressions in rustfmt forks like https://github.com/tucant/rustfmt + pub fn parse_for_head(&mut self) -> PResult<'a, (Box<Pat>, Box<Expr>)> { let begin_paren = if self.token == token::OpenParen { // Record whether we are about to parse `for (`. // This is used below for recovery in case of `for ( $stuff ) $block` |
