1
Fork 0

Change msg: impl Into<String> for bug diagnostics.

To `msg: impl Into<DiagnosticMessage>`, like all the other diagnostics.
For consistency.
This commit is contained in:
Nicholas Nethercote 2023-12-14 12:26:15 +11:00
parent e3b7ecc1ef
commit 19d28a4f28
5 changed files with 15 additions and 13 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) {