fn check_item(&mut self, cx: &LateContext<'_, '_>, it: &hir::Item) {
match it.node {
hir::ItemKind::Fn(..) |
- hir::ItemKind::Ty(..) |
+ hir::ItemKind::TyAlias(..) |
hir::ItemKind::Enum(..) |
hir::ItemKind::Struct(..) |
hir::ItemKind::Union(..) => {
}
"a trait"
}
- hir::ItemKind::Ty(..) => "a type alias",
+ hir::ItemKind::TyAlias(..) => "a type alias",
hir::ItemKind::Impl(.., Some(ref trait_ref), _, ref impl_item_refs) => {
// If the trait is private, add the impl items to `private_traits` so they don't get
// reported for missing docs.
hir::ImplItemKind::Const(..) => "an associated constant",
hir::ImplItemKind::Method(..) => "a method",
hir::ImplItemKind::Type(_) => "an associated type",
- hir::ImplItemKind::Existential(_) => "an associated existential type",
+ hir::ImplItemKind::OpaqueTy(_) => "an associated `impl Trait` type",
};
self.check_missing_docs_attrs(cx,
Some(impl_item.hir_id),
impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeAliasBounds {
fn check_item(&mut self, cx: &LateContext<'_, '_>, item: &hir::Item) {
let (ty, type_alias_generics) = match item.node {
- hir::ItemKind::Ty(ref ty, ref generics) => (&*ty, generics),
+ hir::ItemKind::TyAlias(ref ty, ref generics) => (&*ty, generics),
_ => return,
};
let mut suggested_changing_assoc_types = false;