X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Flibrustc_lint%2Fbuiltin.rs;h=76dc2f0db1625813f655dc3652f4652a1f87db69;hb=8aa45c65d897570696830ea0675fa2faa989c536;hp=6ac68e86e4be9630d0580c2d675670989cd9d85a;hpb=0924ac7290435a92ab2ea671991d56fcf532b459;p=rust.git diff --git a/src/librustc_lint/builtin.rs b/src/librustc_lint/builtin.rs index 6ac68e86e4b..76dc2f0db16 100644 --- a/src/librustc_lint/builtin.rs +++ b/src/librustc_lint/builtin.rs @@ -117,7 +117,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for BoxPointers { 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(..) => { @@ -406,7 +406,7 @@ fn check_item(&mut self, cx: &LateContext<'_, '_>, it: &hir::Item) { } "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. @@ -461,7 +461,7 @@ fn check_impl_item(&mut self, cx: &LateContext<'_, '_>, impl_item: &hir::ImplIte 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), @@ -1123,7 +1123,7 @@ fn visit_qpath(&mut self, qpath: &'v hir::QPath, id: hir::HirId, span: Span) { 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;