diff options
| author | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2022-01-26 04:40:43 +0000 |
|---|---|---|
| committer | Eduard-Mihai Burtescu <eddyb@lyken.rs> | 2022-02-23 05:38:24 +0000 |
| commit | 8562d6b7523b498f731f78dd740d0bc612983ffc (patch) | |
| tree | 0b378484f5356cba9b466d0187adf1e3282a6098 /compiler/rustc_parse/src/parser/expr.rs | |
| parent | d4fc5ae25cea1068fc2a3d96763d3ede3a6a14d4 (diff) | |
| download | rust-8562d6b7523b498f731f78dd740d0bc612983ffc.tar.gz rust-8562d6b7523b498f731f78dd740d0bc612983ffc.zip | |
rustc_errors: remove `struct_dummy`.
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; } } } |
