1
Fork 0

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

@ -13,7 +13,7 @@ use std::error::Report;
/// Typically performed once for each diagnostic at the start of `emit_diagnostic` and then
/// passed around as a reference thereafter.
pub fn to_fluent_args<'iter>(
iter: impl Iterator<Item = DiagnosticArg<'iter, 'static>>,
iter: impl Iterator<Item = DiagnosticArg<'iter>>,
) -> FluentArgs<'static> {
let mut args = if let Some(size) = iter.size_hint().1 {
FluentArgs::with_capacity(size)