diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index 0ce20fda27f..bf1ab37a1cf 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -23,7 +23,7 @@ pub struct SuggestionsDisabled; /// Simplified version of `FluentArg` that can implement `Encodable` and `Decodable`. Collection of /// `DiagnosticArg` are converted to `FluentArgs` (consuming the collection) at the start of /// diagnostic emission. -pub type DiagnosticArg<'iter, 'source> = (&'iter DiagnosticArgName, &'iter DiagnosticArgValue); +pub type DiagnosticArg<'iter> = (&'iter DiagnosticArgName, &'iter DiagnosticArgValue); /// Name of a diagnostic argument. pub type DiagnosticArgName = Cow<'static, str>; @@ -909,7 +909,7 @@ impl Diagnostic { // Exact iteration order of diagnostic arguments shouldn't make a difference to output because // they're only used in interpolation. #[allow(rustc::potential_query_instability)] - pub fn args(&self) -> impl Iterator> { + pub fn args(&self) -> impl Iterator> { self.args.iter() } diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 295112c7c3c..9090adea156 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -628,7 +628,7 @@ impl DiagCtxt { pub fn eagerly_translate<'a>( &self, message: DiagnosticMessage, - args: impl Iterator>, + args: impl Iterator>, ) -> 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>, + args: impl Iterator>, ) -> String { let inner = self.inner.borrow(); let args = crate::translation::to_fluent_args(args); diff --git a/compiler/rustc_errors/src/translation.rs b/compiler/rustc_errors/src/translation.rs index af927bf9629..5bdac367d55 100644 --- a/compiler/rustc_errors/src/translation.rs +++ b/compiler/rustc_errors/src/translation.rs @@ -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>, + iter: impl Iterator>, ) -> FluentArgs<'static> { let mut args = if let Some(size) = iter.size_hint().1 { FluentArgs::with_capacity(size)