Skip to content

Commit dc05a30

Browse files
committed
Inline and remove HandlerInner::emit_diag_at_span.
It has a single call site.
1 parent 43a0f55 commit dc05a30

File tree

1 file changed

+1
-5
lines changed
  • compiler/rustc_errors/src

1 file changed

+1
-5
lines changed

compiler/rustc_errors/src/lib.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -1575,14 +1575,10 @@ impl HandlerInner {
15751575

15761576
#[track_caller]
15771577
fn span_bug(&mut self, sp: impl Into<MultiSpan>, msg: impl Into<String>) -> ! {
1578-
self.emit_diag_at_span(Diagnostic::new(Bug, msg.into()), sp);
1578+
self.emit_diagnostic(Diagnostic::new(Bug, msg.into()).set_span(sp));
15791579
panic::panic_any(ExplicitBug);
15801580
}
15811581

1582-
fn emit_diag_at_span(&mut self, mut diag: Diagnostic, sp: impl Into<MultiSpan>) {
1583-
self.emit_diagnostic(diag.set_span(sp));
1584-
}
1585-
15861582
fn failure_note(&mut self, msg: impl Into<DiagnosticMessage>) {
15871583
self.emit_diagnostic(&mut Diagnostic::new(FailureNote, msg));
15881584
}

0 commit comments

Comments
 (0)