diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-01-11 21:08:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-11 21:08:07 +0100 |
| commit | 7ee3fd2edce794a452f9b91dd2cb8fe8f5bc151a (patch) | |
| tree | 02cb97bec9ae9941481353f692f995294f6c83d8 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | ef4046e4f3932991971cdb64915172899532aece (diff) | |
| parent | 531193853142a2564f1c667c9e8ca96c524a380b (diff) | |
| download | rust-7ee3fd2edce794a452f9b91dd2cb8fe8f5bc151a.tar.gz rust-7ee3fd2edce794a452f9b91dd2cb8fe8f5bc151a.zip | |
Rollup merge of #106620 - estebank:issue-82051, r=davidtwco
Detect struct literal needing parentheses Fix #82051.
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 9f436783ced..f5093fb02a8 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -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)) } |
