From 141f79f8440229f705f47f06c47b46a44d65584b Mon Sep 17 00:00:00 2001 From: Oliver Schneider Date: Mon, 2 Jul 2018 19:07:12 +0200 Subject: [PATCH] Rustup --- clippy_lints/src/enum_glob_use.rs | 2 +- clippy_lints/src/methods.rs | 2 +- clippy_lints/src/utils/inspector.rs | 20 ++++++++++---------- clippy_lints/src/utils/internal_lints.rs | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/clippy_lints/src/enum_glob_use.rs b/clippy_lints/src/enum_glob_use.rs index 943a5406b54..9a0263f2f68 100644 --- a/clippy_lints/src/enum_glob_use.rs +++ b/clippy_lints/src/enum_glob_use.rs @@ -44,7 +44,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for EnumGlobUse { impl EnumGlobUse { fn lint_item(&self, cx: &LateContext, item: &Item) { - if item.vis == Visibility::Public { + if item.vis.node == VisibilityKind::Public { return; // re-exports are fine } if let ItemUse(ref path, UseKind::Glob) = item.node { diff --git a/clippy_lints/src/methods.rs b/clippy_lints/src/methods.rs index 71f9dc8e03f..1d1d0ef8faa 100644 --- a/clippy_lints/src/methods.rs +++ b/clippy_lints/src/methods.rs @@ -840,7 +840,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass { .iter() .any(|k| k.matches(first_arg_ty, first_arg, self_ty, is_copy, &implitem.generics)); then { - let lint = if item.vis == hir::Visibility::Public { + let lint = if item.vis.node == hir::VisibilityKind::Public { WRONG_PUB_SELF_CONVENTION } else { WRONG_SELF_CONVENTION diff --git a/clippy_lints/src/utils/inspector.rs b/clippy_lints/src/utils/inspector.rs index b23464c80de..ccc4c9df6e7 100644 --- a/clippy_lints/src/utils/inspector.rs +++ b/clippy_lints/src/utils/inspector.rs @@ -51,14 +51,14 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass { return; } println!("impl item `{}`", item.ident.name); - match item.vis { - hir::Visibility::Public => println!("public"), - hir::Visibility::Crate(_) => println!("visible crate wide"), - hir::Visibility::Restricted { ref path, .. } => println!( + match item.vis.node { + hir::VisibilityKind::Public => println!("public"), + hir::VisibilityKind::Crate(_) => println!("visible crate wide"), + hir::VisibilityKind::Restricted { ref path, .. } => println!( "visible in module `{}`", print::to_string(print::NO_ANN, |s| s.print_path(path, false)) ), - hir::Visibility::Inherited => println!("visibility inherited from outer item"), + hir::VisibilityKind::Inherited => println!("visibility inherited from outer item"), } if item.defaultness.is_default() { println!("default"); @@ -343,14 +343,14 @@ fn print_expr(cx: &LateContext, expr: &hir::Expr, indent: usize) { fn print_item(cx: &LateContext, item: &hir::Item) { let did = cx.tcx.hir.local_def_id(item.id); println!("item `{}`", item.name); - match item.vis { - hir::Visibility::Public => println!("public"), - hir::Visibility::Crate(_) => println!("visible crate wide"), - hir::Visibility::Restricted { ref path, .. } => println!( + match item.vis.node { + hir::VisibilityKind::Public => println!("public"), + hir::VisibilityKind::Crate(_) => println!("visible crate wide"), + hir::VisibilityKind::Restricted { ref path, .. } => println!( "visible in module `{}`", print::to_string(print::NO_ANN, |s| s.print_path(path, false)) ), - hir::Visibility::Inherited => println!("visibility inherited from outer item"), + hir::VisibilityKind::Inherited => println!("visibility inherited from outer item"), } match item.node { hir::ItemExternCrate(ref _renamed_from) => { diff --git a/clippy_lints/src/utils/internal_lints.rs b/clippy_lints/src/utils/internal_lints.rs index b1b65698eb9..f0e3961600c 100644 --- a/clippy_lints/src/utils/internal_lints.rs +++ b/clippy_lints/src/utils/internal_lints.rs @@ -120,7 +120,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for LintWithoutLintPass { if let ItemStatic(ref ty, MutImmutable, body_id) = item.node { if is_lint_ref_type(ty) { self.declared_lints.insert(item.name, item.span); - } else if is_lint_array_type(ty) && item.vis == Visibility::Inherited && item.name == "ARRAY" { + } else if is_lint_array_type(ty) && item.vis.node == VisibilityKind::Inherited && item.name == "ARRAY" { let mut collector = LintCollector { output: &mut self.registered_lints, cx,