Inline and remove HandlerInner::emit_diag_at_span
.
It has a single call site.
This commit is contained in:
parent
43a0f55506
commit
dc05a30996
@ -1575,14 +1575,10 @@ fn has_errors(&self) -> bool {
|
||||
|
||||
#[track_caller]
|
||||
fn span_bug(&mut self, sp: impl Into<MultiSpan>, msg: impl Into<String>) -> ! {
|
||||
self.emit_diag_at_span(Diagnostic::new(Bug, msg.into()), sp);
|
||||
self.emit_diagnostic(Diagnostic::new(Bug, msg.into()).set_span(sp));
|
||||
panic::panic_any(ExplicitBug);
|
||||
}
|
||||
|
||||
fn emit_diag_at_span(&mut self, mut diag: Diagnostic, sp: impl Into<MultiSpan>) {
|
||||
self.emit_diagnostic(diag.set_span(sp));
|
||||
}
|
||||
|
||||
fn failure_note(&mut self, msg: impl Into<DiagnosticMessage>) {
|
||||
self.emit_diagnostic(&mut Diagnostic::new(FailureNote, msg));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user