about summary refs log tree commit diff
path: root/compiler/rustc_parse/src/parser
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-12-14 12:26:15 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-12-15 09:42:14 +1100
commit19d28a4f28ad8125775e73e97e8bab2b2229f4e1 (patch)
tree34cfe52e12dcd44dc07d7783903c866d8b3a5197 /compiler/rustc_parse/src/parser
parente3b7ecc1efc7170fe418e99e071598e7e14aebe1 (diff)
downloadrust-19d28a4f28ad8125775e73e97e8bab2b2229f4e1.tar.gz
rust-19d28a4f28ad8125775e73e97e8bab2b2229f4e1.zip
Change `msg: impl Into<String>` for bug diagnostics.
To `msg: impl Into<DiagnosticMessage>`, like all the other diagnostics.
For consistency.
Diffstat (limited to 'compiler/rustc_parse/src/parser')
-rw-r--r--compiler/rustc_parse/src/parser/diagnostics.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_parse/src/parser/diagnostics.rs b/compiler/rustc_parse/src/parser/diagnostics.rs
index 5295172b25e..221fc70d9ff 100644
--- a/compiler/rustc_parse/src/parser/diagnostics.rs
+++ b/compiler/rustc_parse/src/parser/diagnostics.rs
@@ -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 {