@@ -563,7 +563,7 @@ impl MissingDoc {
563563 // It's an option so the crate root can also use this function (it doesn't
564564 // have a `NodeId`).
565565 if def_id != CRATE_DEF_ID {
566- if !cx. access_levels . is_exported ( def_id) {
566+ if !cx. effective_visibilities . is_exported ( def_id) {
567567 return ;
568568 }
569569 }
@@ -721,7 +721,7 @@ declare_lint_pass!(MissingCopyImplementations => [MISSING_COPY_IMPLEMENTATIONS])
721721
722722impl < ' tcx > LateLintPass < ' tcx > for MissingCopyImplementations {
723723 fn check_item ( & mut self , cx : & LateContext < ' _ > , item : & hir:: Item < ' _ > ) {
724- if !cx. access_levels . is_reachable ( item. def_id . def_id ) {
724+ if !cx. effective_visibilities . is_reachable ( item. def_id . def_id ) {
725725 return ;
726726 }
727727 let ( def, ty) = match item. kind {
@@ -814,7 +814,7 @@ impl_lint_pass!(MissingDebugImplementations => [MISSING_DEBUG_IMPLEMENTATIONS]);
814814
815815impl < ' tcx > LateLintPass < ' tcx > for MissingDebugImplementations {
816816 fn check_item ( & mut self , cx : & LateContext < ' _ > , item : & hir:: Item < ' _ > ) {
817- if !cx. access_levels . is_reachable ( item. def_id . def_id ) {
817+ if !cx. effective_visibilities . is_reachable ( item. def_id . def_id ) {
818818 return ;
819819 }
820820
@@ -1385,7 +1385,8 @@ impl UnreachablePub {
13851385 exportable : bool ,
13861386 ) {
13871387 let mut applicability = Applicability :: MachineApplicable ;
1388- if cx. tcx . visibility ( def_id) . is_public ( ) && !cx. access_levels . is_reachable ( def_id) {
1388+ if cx. tcx . visibility ( def_id) . is_public ( ) && !cx. effective_visibilities . is_reachable ( def_id)
1389+ {
13891390 if vis_span. from_expansion ( ) {
13901391 applicability = Applicability :: MaybeIncorrect ;
13911392 }
0 commit comments