1
Fork 0

Detect struct literal needing parentheses

Fix #82051.
This commit is contained in:
Esteban Küber 2023-01-09 05:29:54 +00:00
parent b22c152958
commit 5311938531
8 changed files with 86 additions and 15 deletions

View file

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