Skip to content

Commit

Permalink
let-chain fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
estebank committed Nov 17, 2023
1 parent 22fc51f commit b4b5981
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion compiler/rustc_parse/src/parser/expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3073,7 +3073,10 @@ impl<'a> Parser<'a> {
CommaRecoveryMode::EitherTupleOrPipe,
) {
Ok(pat) => Ok((pat, self.parse_match_arm_guard()?)),
Err(err) if let prev_sp = self.prev_token.span && let true = self.eat_keyword(kw::If) => {
Err(err)
if let prev_sp = self.prev_token.span
&& let true = self.eat_keyword(kw::If) =>
{
// We know for certain we've found `($pat if` so far.
let mut cond = match self.parse_match_guard_condition() {
Ok(cond) => cond,
Expand Down

0 comments on commit b4b5981

Please sign in to comment.