diff options
Diffstat (limited to 'compiler/rustc_parse/src/parser/expr.rs')
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index 8283fd0d207..48b2bf8477c 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -1622,9 +1622,11 @@ impl<'a> Parser<'a> { }; if let Some(expr) = expr { if matches!(expr.kind, ExprKind::Err) { - self.diagnostic() - .delay_span_bug(self.token.span, &"invalid interpolated expression"); - return self.diagnostic().struct_dummy(); + let mut err = self + .diagnostic() + .struct_span_err(self.token.span, &"invalid interpolated expression"); + err.downgrade_to_delayed_bug(); + return err; } } } |
