Address comments

This commit is contained in:
John Kåre Alsaker
2019-01-15 00:54:56 +01:00
parent e459000bc1
commit e301f90f22
+5 -3
View File
@@ -783,7 +783,8 @@ fn nested_visit_map<'this>(&'this mut self) -> NestedVisitorMap<'this, 'tcx> {
}
fn visit_mod(&mut self, _m: &'tcx hir::Mod, _s: Span, _n: ast::NodeId) {
// Don't visit modules inside
// Don't visit nested modules, since we run a separate visitor walk
// for each module in `privacy_access_levels`
}
fn visit_nested_body(&mut self, body: hir::BodyId) {
@@ -922,7 +923,8 @@ fn nested_visit_map<'this>(&'this mut self) -> NestedVisitorMap<'this, 'tcx> {
}
fn visit_mod(&mut self, _m: &'tcx hir::Mod, _s: Span, _n: ast::NodeId) {
// Don't visit modules inside
// Don't visit nested modules, since we run a separate visitor walk
// for each module in `privacy_access_levels`
}
fn visit_nested_body(&mut self, body: hir::BodyId) {
@@ -1710,7 +1712,7 @@ fn privacy_access_levels<'tcx>(
let krate = tcx.hir().krate();
for &module in tcx.hir().krate().modules.keys() {
for &module in krate.modules.keys() {
queries::check_mod_privacy::ensure(tcx, tcx.hir().local_def_id(module));
}