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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user