Skip to content

Commit 09105c3

Browse files
authored
Make Parser::parse_for_head public for rustfmt usage
1 parent c0bb3b9 commit 09105c3

File tree

1 file changed

+1
-0
lines changed
  • compiler/rustc_parse/src/parser

1 file changed

+1
-0
lines changed

compiler/rustc_parse/src/parser/expr.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2910,6 +2910,7 @@ impl<'a> Parser<'a> {
29102910
}
29112911
}
29122912

2913+
// Public to use it for custom `for` expressions in rustfmt forks like https://github.com/tucant/rustfmt
29132914
fn parse_for_head(&mut self) -> PResult<'a, (Box<Pat>, Box<Expr>)> {
29142915
let begin_paren = if self.token == token::OpenParen {
29152916
// Record whether we are about to parse `for (`.

0 commit comments

Comments
 (0)