diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-03-21 17:46:49 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-21 17:46:49 +0100 |
| commit | 8b132109c4dc5b4d0ec76590d11fc7f934b096ba (patch) | |
| tree | ee05ed7593b4a24435a74a9f1720062985d884a3 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | 40c972e3351eba693e99a8a2e34c91b991f9b50b (diff) | |
| parent | 82a609f9a6922a5adec4d71bff1f948d868d0384 (diff) | |
| download | rust-8b132109c4dc5b4d0ec76590d11fc7f934b096ba.tar.gz rust-8b132109c4dc5b4d0ec76590d11fc7f934b096ba.zip | |
Rollup merge of #122752 - nnethercote:Interpolated-cleanups, r=petrochenkov
Interpolated cleanups Various cleanups I made while working on attempts to remove `Interpolated`, that are worth merging now. Best reviewed one commit at a time. r? `@petrochenkov`
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 6256db99251..d175d1c04c8 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -2053,16 +2053,6 @@ impl<'a> Parser<'a> { &mut self, mk_lit_char: impl FnOnce(Symbol, Span) -> L, ) -> PResult<'a, L> { - if let token::Interpolated(nt) = &self.token.kind - && let token::NtExpr(e) | token::NtLiteral(e) = &nt.0 - && matches!(e.kind, ExprKind::Err(_)) - { - let mut err = self - .dcx() - .create_err(errors::InvalidInterpolatedExpression { span: self.token.span }); - err.downgrade_to_delayed_bug(); - return Err(err); - } let token = self.token.clone(); let err = |self_: &Self| { let msg = format!("unexpected token: {}", super::token_descr(&token)); |
