about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser/expr.rs
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2025-03-24 00:12:53 +0100
committerLeón Orell Valerian Liehr <me@fmease.dev>2025-03-25 15:15:41 +0100
commit9f336ce2eb0ba04de7f1ddd2e1b0958e7df15c42 (patch)
treea8412729bbf3f584d8743dc4cacf4ba159149515 /compiler/rustc_parse/src/parser/expr.rs
parent82796dd8585c0c160fe2a50b12f77455a7e0f8d7 (diff)
downloadrust-9f336ce2eb0ba04de7f1ddd2e1b0958e7df15c42.tar.gz
rust-9f336ce2eb0ba04de7f1ddd2e1b0958e7df15c42.zip
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.
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
-rw-r--r--compiler/rustc_parse/src/parser/expr.rs2
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 79d12ed4bbe..92e83577f1b 100644
--- a/compiler/rustc_parse/src/parser/expr.rs
+++ b/compiler/rustc_parse/src/parser/expr.rs
@@ -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))
     }