diff --git a/clippy_lints/src/missing_doc.rs b/clippy_lints/src/missing_doc.rs index eb4dfe8ba..7ccee73d8 100644 --- a/clippy_lints/src/missing_doc.rs +++ b/clippy_lints/src/missing_doc.rs @@ -177,6 +177,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc { hir::ImplItemKind::Const(..) => "an associated constant", hir::ImplItemKind::Method(..) => "a method", hir::ImplItemKind::Type(_) => "an associated type", + hir::ImplItemKind::Existential(_) => "an existential type", }; self.check_missing_docs_attrs(cx, &impl_item.attrs, impl_item.span, desc); } diff --git a/clippy_lints/src/missing_inline.rs b/clippy_lints/src/missing_inline.rs index 0ca1c53d6..20252393f 100644 --- a/clippy_lints/src/missing_inline.rs +++ b/clippy_lints/src/missing_inline.rs @@ -165,7 +165,8 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingInline { let desc = match impl_item.node { hir::ImplItemKind::Method(..) => "a method", hir::ImplItemKind::Const(..) | - hir::ImplItemKind::Type(_) => return, + hir::ImplItemKind::Type(_) | + hir::ImplItemKind::Existential(_) => return, }; let def_id = cx.tcx.hir.local_def_id(impl_item.id); diff --git a/clippy_lints/src/utils/inspector.rs b/clippy_lints/src/utils/inspector.rs index b2b99da3c..2e0f84318 100644 --- a/clippy_lints/src/utils/inspector.rs +++ b/clippy_lints/src/utils/inspector.rs @@ -70,6 +70,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass { }, hir::ImplItemKind::Method(..) => println!("method"), hir::ImplItemKind::Type(_) => println!("associated type"), + hir::ImplItemKind::Existential(_) => println!("existential type"), } } // fn check_trait_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx diff --git a/clippy_lints/src/utils/mod.rs b/clippy_lints/src/utils/mod.rs index c38a925ef..10a57e147 100644 --- a/clippy_lints/src/utils/mod.rs +++ b/clippy_lints/src/utils/mod.rs @@ -982,6 +982,7 @@ pub fn opt_def_id(def: Def) -> Option { Def::AssociatedConst(id) | Def::Macro(id, ..) | Def::Existential(id) | + Def::AssociatedExistential(id) | Def::GlobalAsm(id) => Some(id), Def::Upvar(..) | Def::Local(_) | Def::Label(..) | Def::PrimTy(..) | Def::SelfTy(..) | Def::Err => None,