about summary refs log tree commit diff
path: root/compiler/rustc_errors/src/diagnostic_builder.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2024-01-05 16:38:04 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2024-01-08 16:07:14 +1100
commit4752a923af2a0e26b2da0861e4a8f1f6c35b6d56 (patch)
tree544820bebe8fe99599e332b614dde5d52e0692f1 /compiler/rustc_errors/src/diagnostic_builder.rs
parentd406278180f1cd7792f50be890658f2739c621fb (diff)
downloadrust-4752a923af2a0e26b2da0861e4a8f1f6c35b6d56.tar.gz
rust-4752a923af2a0e26b2da0861e4a8f1f6c35b6d56.zip
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.
Diffstat (limited to 'compiler/rustc_errors/src/diagnostic_builder.rs')
-rw-r--r--compiler/rustc_errors/src/diagnostic_builder.rs7
1 files changed, 0 insertions, 7 deletions
diff --git a/compiler/rustc_errors/src/diagnostic_builder.rs b/compiler/rustc_errors/src/diagnostic_builder.rs
index eb081df040a..6fd485e00ad 100644
--- a/compiler/rustc_errors/src/diagnostic_builder.rs
+++ b/compiler/rustc_errors/src/diagnostic_builder.rs
@@ -366,13 +366,6 @@ impl<'a, G: EmissionGuarantee> DiagnosticBuilder<'a, G> {
         self.emit()
     }
 
-    /// Non-consuming variant of `delay_as_bug`.
-    #[track_caller]
-    pub fn delay_as_bug_without_consuming(&mut self) -> G::EmitResult {
-        self.downgrade_to_delayed_bug();
-        G::emit_producing_guarantee(self)
-    }
-
     forward!((span_label, span_label_mv)(
         span: Span,
         label: impl Into<SubdiagnosticMessage>,