]> git.lizzy.rs Git - rust.git/blobdiff - clippy_lints/src/partialeq_ne_impl.rs
ast/hir: Rename field-related structures
[rust.git] / clippy_lints / src / partialeq_ne_impl.rs
index 3d6129aa78d4c47d71d832eb4b76d803fdc90c2d..aca1ed5ca6563144b4e3e9fc3a925f816a05ffd9 100644 (file)
@@ -35,7 +35,8 @@ impl<'tcx> LateLintPass<'tcx> for PartialEqNeImpl {
     fn check_item(&mut self, cx: &LateContext<'tcx>, item: &'tcx Item<'_>) {
         if_chain! {
             if let ItemKind::Impl(Impl { of_trait: Some(ref trait_ref), items: impl_items, .. }) = item.kind;
-            if !is_automatically_derived(&*item.attrs);
+            let attrs = cx.tcx.hir().attrs(item.hir_id());
+            if !is_automatically_derived(attrs);
             if let Some(eq_trait) = cx.tcx.lang_items().eq_trait();
             if trait_ref.path.res.def_id() == eq_trait;
             then {