1
Fork 0

Remove now unreachable parse recovery code

StructLiteralNeedingParens is no longer reachable always giving
precedence to StructLiteralNotAllowedHere.

As an aside: The former error struct shouldn't've existed in the
first place. We should've just used the latter in this branch.
This commit is contained in:
León Orell Valerian Liehr 2025-03-24 00:12:53 +01:00
parent 82796dd858
commit 9f336ce2eb
No known key found for this signature in database
GPG key ID: D17A07215F68E713
6 changed files with 24 additions and 76 deletions

View file

@ -2296,7 +2296,7 @@ impl<'a> Parser<'a> {
});
}
let (attrs, blk) = self.parse_block_common(lo, blk_mode, true, None)?;
let (attrs, blk) = self.parse_block_common(lo, blk_mode, None)?;
Ok(self.mk_expr_with_attrs(blk.span, ExprKind::Block(blk, opt_label), attrs))
}