Rename walk_crate.

This commit is contained in:
Camille GILLOT 2021-09-02 19:22:24 +02:00
parent df148e4efb
commit d119a13137
11 changed files with 14 additions and 14 deletions

View file

@ -2169,7 +2169,7 @@ fn privacy_access_levels(tcx: TyCtxt<'_>, (): ()) -> &AccessLevels {
changed: false,
};
loop {
tcx.hir().walk_crate(&mut visitor);
tcx.hir().walk_toplevel_module(&mut visitor);
if visitor.changed {
visitor.changed = false;
} else {
@ -2192,11 +2192,11 @@ fn check_private_in_public(tcx: TyCtxt<'_>, (): ()) {
in_variant: false,
old_error_set: Default::default(),
};
tcx.hir().walk_crate(&mut visitor);
tcx.hir().walk_toplevel_module(&mut visitor);
let has_pub_restricted = {
let mut pub_restricted_visitor = PubRestrictedVisitor { tcx, has_pub_restricted: false };
tcx.hir().walk_crate(&mut pub_restricted_visitor);
tcx.hir().walk_toplevel_module(&mut pub_restricted_visitor);
pub_restricted_visitor.has_pub_restricted
};