From 71a943820bee0daa2d9f89c0c9b7f8758bcfd429 Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Mon, 5 Aug 2019 07:30:01 +0200 Subject: [PATCH] Rustup to https://github.com/rust-lang/rust/pull/63213 --- clippy_lints/src/missing_doc.rs | 4 ++-- clippy_lints/src/missing_inline.rs | 4 ++-- clippy_lints/src/types.rs | 2 +- clippy_lints/src/utils/inspector.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/clippy_lints/src/missing_doc.rs b/clippy_lints/src/missing_doc.rs index 00f1cf9a5bd4..7f49a287cff3 100644 --- a/clippy_lints/src/missing_doc.rs +++ b/clippy_lints/src/missing_doc.rs @@ -146,7 +146,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc { hir::ItemKind::Struct(..) => "a struct", hir::ItemKind::Trait(..) => "a trait", hir::ItemKind::TraitAlias(..) => "a trait alias", - hir::ItemKind::Ty(..) => "a type alias", + hir::ItemKind::TyAlias(..) => "a type alias", hir::ItemKind::Union(..) => "a union", hir::ItemKind::OpaqueTy(..) => "an existential type", hir::ItemKind::ExternCrate(..) @@ -184,7 +184,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingDoc { let desc = match impl_item.node { hir::ImplItemKind::Const(..) => "an associated constant", hir::ImplItemKind::Method(..) => "a method", - hir::ImplItemKind::Type(_) => "an associated type", + hir::ImplItemKind::TyAlias(_) => "an associated type", hir::ImplItemKind::OpaqueTy(_) => "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 c467f2fc3886..e738fd55456a 100644 --- a/clippy_lints/src/missing_inline.rs +++ b/clippy_lints/src/missing_inline.rs @@ -119,7 +119,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for MissingInline { | hir::ItemKind::Struct(..) | hir::ItemKind::TraitAlias(..) | hir::ItemKind::GlobalAsm(..) - | hir::ItemKind::Ty(..) + | hir::ItemKind::TyAlias(..) | hir::ItemKind::Union(..) | hir::ItemKind::OpaqueTy(..) | hir::ItemKind::ExternCrate(..) @@ -142,7 +142,7 @@ 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(_) | hir::ImplItemKind::OpaqueTy(_) => return, + hir::ImplItemKind::Const(..) | hir::ImplItemKind::TyAlias(_) | hir::ImplItemKind::OpaqueTy(_) => return, }; let def_id = cx.tcx.hir().local_def_id(impl_item.hir_id); diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index 3c8ca3fea679..654674de06af 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -1354,7 +1354,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for TypeComplexity { fn check_impl_item(&mut self, cx: &LateContext<'a, 'tcx>, item: &'tcx ImplItem) { match item.node { - ImplItemKind::Const(ref ty, _) | ImplItemKind::Type(ref ty) => self.check_type(cx, ty), + ImplItemKind::Const(ref ty, _) | ImplItemKind::TyAlias(ref ty) => self.check_type(cx, ty), // methods are covered by check_fn _ => (), } diff --git a/clippy_lints/src/utils/inspector.rs b/clippy_lints/src/utils/inspector.rs index c061e4f91e8c..809590c88bf5 100644 --- a/clippy_lints/src/utils/inspector.rs +++ b/clippy_lints/src/utils/inspector.rs @@ -63,7 +63,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for DeepCodeInspector { print_expr(cx, &cx.tcx.hir().body(body_id).value, 1); }, hir::ImplItemKind::Method(..) => println!("method"), - hir::ImplItemKind::Type(_) => println!("associated type"), + hir::ImplItemKind::TyAlias(_) => println!("associated type"), hir::ImplItemKind::OpaqueTy(_) => println!("existential type"), } } @@ -360,7 +360,7 @@ fn print_item(cx: &LateContext<'_, '_>, item: &hir::Item) { hir::ItemKind::Mod(..) => println!("module"), hir::ItemKind::ForeignMod(ref fm) => println!("foreign module with abi: {}", fm.abi), hir::ItemKind::GlobalAsm(ref asm) => println!("global asm: {:?}", asm), - hir::ItemKind::Ty(..) => { + hir::ItemKind::TyAlias(..) => { println!("type alias for {:?}", cx.tcx.type_of(did)); }, hir::ItemKind::OpaqueTy(..) => {