Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion compiler/rustc_parse/src/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
Loading