From 0ebc656a9add6a08dac7d8be3e7f1983998bef34 Mon Sep 17 00:00:00 2001 From: HKalbasi <45197576+HKalbasi@users.noreply.github.com> Date: Sun, 3 Oct 2021 13:01:57 +0330 Subject: [PATCH] Change not enum to is struct --- clippy_lints/src/derivable_impls.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clippy_lints/src/derivable_impls.rs b/clippy_lints/src/derivable_impls.rs index 63422f7ec..fdef0abe9 100644 --- a/clippy_lints/src/derivable_impls.rs +++ b/clippy_lints/src/derivable_impls.rs @@ -83,7 +83,7 @@ impl<'tcx> LateLintPass<'tcx> for DerivableImpls { if !attrs.iter().any(|attr| attr.doc_str().is_some()); if let child_attrs = cx.tcx.hir().attrs(impl_item_hir); if !child_attrs.iter().any(|attr| attr.doc_str().is_some()); - if !adt_def.is_enum(); + if adt_def.is_struct(); then { if let TyKind::Path(QPath::Resolved(_, p)) = self_ty.kind { if let Some(PathSegment { args: Some(a), .. }) = p.segments.last() {