Remove DiagnosticBuilder::delay_as_bug_without_consuming
.
The existing uses are replaced in one of three ways. - In a function that also has calls to `emit`, just rearrange the code so that exactly one of `delay_as_bug` or `emit` is called on every path. - In a function returning a `DiagnosticBuilder`, use `downgrade_to_delayed_bug`. That's good enough because it will get emitted later anyway. - In `unclosed_delim_err`, one set of errors is being replaced with another set, so just cancel the original errors.
This commit is contained in:
parent
d406278180
commit
4752a923af
10 changed files with 18 additions and 22 deletions
|
@ -1040,7 +1040,7 @@ impl<'a, G: EmissionGuarantee> IntoDiagnostic<'_, G> for BreakNonLoop<'a> {
|
|||
// This error is redundant, we will have already emitted a
|
||||
// suggestion to use the label when `segment` wasn't found
|
||||
// (hence the `Res::Err` check).
|
||||
diag.delay_as_bug_without_consuming();
|
||||
diag.downgrade_to_delayed_bug();
|
||||
}
|
||||
_ => {
|
||||
diag.span_suggestion(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue