From 76e765aeda1ad2b6901b1255a6baa434bad76f1b Mon Sep 17 00:00:00 2001 From: cgm616 Date: Thu, 2 Nov 2017 23:53:48 -0500 Subject: [PATCH] Switch to new method of checking access --- clippy_lints/src/methods.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/clippy_lints/src/methods.rs b/clippy_lints/src/methods.rs index f6787c61ae2..4f55162e57f 100644 --- a/clippy_lints/src/methods.rs +++ b/clippy_lints/src/methods.rs @@ -760,8 +760,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for Pass { if let Some(first_arg) = iter_input_pats(&sig.decl, cx.tcx.hir.body(id)).next(); if let hir::ItemImpl(_, _, _, _, None, ref self_ty, _) = item.node; then { - if implitem.vis == hir::Visibility::Public || - implitem.vis.is_pub_restricted() { + if cx.access_levels.is_exported(implitem.id) { // check missing trait implementations for &(method_name, n_args, self_kind, out_type, trait_name) in &TRAIT_METHODS { if name == method_name &&