diff --git a/compiler/rustc_macros/src/diagnostics/diagnostic.rs b/compiler/rustc_macros/src/diagnostics/diagnostic.rs index 8ba2fcf6ec2..c24b45862eb 100644 --- a/compiler/rustc_macros/src/diagnostics/diagnostic.rs +++ b/compiler/rustc_macros/src/diagnostics/diagnostic.rs @@ -360,10 +360,10 @@ impl SessionDiagnosticDeriveBuilder { Ok(tokens.drain(..).collect()) } - fn generate_field_attrs_code<'a>( - &'a mut self, - attrs: &'a [syn::Attribute], - info: FieldInfo<'a>, + fn generate_field_attrs_code( + &mut self, + attrs: &[syn::Attribute], + info: FieldInfo<'_>, ) -> TokenStream { let field_binding = &info.binding.binding;