@@ -135,7 +135,7 @@ fn get_impl_trait_def_id(cx: &LateContext<'_>, method_def_id: LocalDefId) -> Opt
135
135
} ) ,
136
136
) ) = cx. tcx . hir_parent_iter ( hir_id) . next ( )
137
137
// We exclude `impl` blocks generated from rustc's proc macros.
138
- && !cx. tcx . has_attr ( * owner_id, sym :: automatically_derived )
138
+ && !cx. tcx . is_automatically_derived ( owner_id. to_def_id ( ) )
139
139
// It is a implementation of a trait.
140
140
&& let Some ( trait_) = impl_. of_trait
141
141
{
@@ -240,7 +240,7 @@ fn check_to_string(cx: &LateContext<'_>, method_span: Span, method_def_id: Local
240
240
} ) ,
241
241
) ) = cx. tcx . hir_parent_iter ( hir_id) . next ( )
242
242
// We exclude `impl` blocks generated from rustc's proc macros.
243
- && !cx. tcx . has_attr ( * owner_id, sym :: automatically_derived )
243
+ && !cx. tcx . is_automatically_derived ( owner_id. to_def_id ( ) )
244
244
// It is a implementation of a trait.
245
245
&& let Some ( trait_) = impl_. of_trait
246
246
&& let Some ( trait_def_id) = trait_. trait_def_id ( )
@@ -337,7 +337,7 @@ impl UnconditionalRecursion {
337
337
for ( ty, impl_def_ids) in impls. non_blanket_impls ( ) {
338
338
let Some ( self_def_id) = ty. def ( ) else { continue } ;
339
339
for impl_def_id in impl_def_ids {
340
- if !cx. tcx . has_attr ( * impl_def_id, sym :: automatically_derived ) &&
340
+ if !cx. tcx . is_automatically_derived ( * impl_def_id) &&
341
341
let Some ( assoc_item) = cx
342
342
. tcx
343
343
. associated_items ( impl_def_id)
0 commit comments