We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
HandlerInner::emit_diag_at_span
1 parent 43a0f55 commit dc05a30Copy full SHA for dc05a30
compiler/rustc_errors/src/lib.rs
@@ -1575,14 +1575,10 @@ impl HandlerInner {
1575
1576
#[track_caller]
1577
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);
+ self.emit_diagnostic(Diagnostic::new(Bug, msg.into()).set_span(sp));
1579
panic::panic_any(ExplicitBug);
1580
}
1581
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
-
1586
fn failure_note(&mut self, msg: impl Into<DiagnosticMessage>) {
1587
self.emit_diagnostic(&mut Diagnostic::new(FailureNote, msg));
1588
0 commit comments