Remove the second lifetime from DiagnosticArg.

Because it's always static.

I'm surprised the compiler allowed this unused lifetime without any
complaint.
This commit is contained in:
Nicholas Nethercote
2024-01-30 16:06:18 +11:00
parent f0426b77fc
commit 514a5d8d55
3 changed files with 5 additions and 5 deletions

View File

@@ -628,7 +628,7 @@ impl DiagCtxt {
pub fn eagerly_translate<'a>(
&self,
message: DiagnosticMessage,
args: impl Iterator<Item = DiagnosticArg<'a, 'static>>,
args: impl Iterator<Item = DiagnosticArg<'a>>,
) -> SubdiagnosticMessage {
SubdiagnosticMessage::Eager(Cow::from(self.eagerly_translate_to_string(message, args)))
}
@@ -637,7 +637,7 @@ impl DiagCtxt {
pub fn eagerly_translate_to_string<'a>(
&self,
message: DiagnosticMessage,
args: impl Iterator<Item = DiagnosticArg<'a, 'static>>,
args: impl Iterator<Item = DiagnosticArg<'a>>,
) -> String {
let inner = self.inner.borrow();
let args = crate::translation::to_fluent_args(args);