Switch to new method of checking access
This commit is contained in:
parent
ee289c9f88
commit
76e765aeda
1 changed files with 1 additions and 2 deletions
|
@ -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 Some(first_arg) = iter_input_pats(&sig.decl, cx.tcx.hir.body(id)).next();
|
||||||
if let hir::ItemImpl(_, _, _, _, None, ref self_ty, _) = item.node;
|
if let hir::ItemImpl(_, _, _, _, None, ref self_ty, _) = item.node;
|
||||||
then {
|
then {
|
||||||
if implitem.vis == hir::Visibility::Public ||
|
if cx.access_levels.is_exported(implitem.id) {
|
||||||
implitem.vis.is_pub_restricted() {
|
|
||||||
// check missing trait implementations
|
// check missing trait implementations
|
||||||
for &(method_name, n_args, self_kind, out_type, trait_name) in &TRAIT_METHODS {
|
for &(method_name, n_args, self_kind, out_type, trait_name) in &TRAIT_METHODS {
|
||||||
if name == method_name &&
|
if name == method_name &&
|
||||||
|
|
Loading…
Add table
Reference in a new issue