Switch to new method of checking access

This commit is contained in:
cgm616 2017-11-02 23:53:48 -05:00
parent ee289c9f88
commit 76e765aeda

View File

@ -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 &&