1
Fork 0

Rollup merge of #118933 - nnethercote:cleanup-errors-even-more, r=compiler-errors

Cleanup errors handlers even more

A sequel to #118587.

r? `@compiler-errors`
This commit is contained in:
Jubilee 2023-12-14 16:07:48 -08:00 committed by GitHub
commit 9e872b7cd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 117 additions and 113 deletions

View file

@ -1145,7 +1145,7 @@ impl<'a> ExtCtxt<'a> {
pub fn span_err<S: Into<MultiSpan>>(&self, sp: S, msg: impl Into<DiagnosticMessage>) {
self.sess.diagnostic().span_err(sp, msg);
}
pub fn span_bug<S: Into<MultiSpan>>(&self, sp: S, msg: impl Into<String>) -> ! {
pub fn span_bug<S: Into<MultiSpan>>(&self, sp: S, msg: impl Into<DiagnosticMessage>) -> ! {
self.sess.diagnostic().span_bug(sp, msg);
}
pub fn trace_macros_diag(&mut self) {

View file

@ -502,7 +502,7 @@ impl server::FreeFunctions for Rustc<'_, '_> {
None,
);
}
self.sess().span_diagnostic.emit_diagnostic(&mut diag);
self.sess().span_diagnostic.emit_diagnostic(diag);
}
}