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

@ -249,8 +249,8 @@ impl<'a> Parser<'a> {
self.diagnostic().struct_span_err(sp, m)
}
pub fn span_bug<S: Into<MultiSpan>>(&self, sp: S, m: impl Into<String>) -> ! {
self.diagnostic().span_bug(sp, m)
pub fn span_bug<S: Into<MultiSpan>>(&self, sp: S, msg: impl Into<DiagnosticMessage>) -> ! {
self.diagnostic().span_bug(sp, msg)
}
pub(super) fn diagnostic(&self) -> &'a Handler {