rustc_errors: remove struct_dummy.

This commit is contained in:
Eduard-Mihai Burtescu 2022-01-26 04:40:43 +00:00
parent d4fc5ae25c
commit 8562d6b752
7 changed files with 41 additions and 38 deletions

View file

@ -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;
}
}
}