From 0cdd1d4bc12f7005f32b3fbc9cb4128e46bb0e80 Mon Sep 17 00:00:00 2001 From: Florian Diebold Date: Sat, 29 Oct 2016 14:35:54 +0200 Subject: [PATCH] rustc_privacy: fix compilation --- src/librustc_privacy/lib.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/librustc_privacy/lib.rs b/src/librustc_privacy/lib.rs index ee18968ff35..eb742b87889 100644 --- a/src/librustc_privacy/lib.rs +++ b/src/librustc_privacy/lib.rs @@ -30,7 +30,7 @@ use rustc::hir::{self, PatKind}; use rustc::hir::def::{self, Def, CtorKind}; use rustc::hir::def_id::DefId; -use rustc::hir::intravisit::{self, Visitor}; +use rustc::hir::intravisit::{self, Visitor, NestedVisitMode}; use rustc::hir::itemlikevisit::DeepVisitor; use rustc::hir::pat_util::EnumerateAndAdjustIterator; use rustc::lint; @@ -120,8 +120,8 @@ fn reach<'b>(&'b mut self, item_id: ast::NodeId) impl<'a, 'tcx> Visitor<'tcx> for EmbargoVisitor<'a, 'tcx> { /// We want to visit items in the context of their containing /// module and so forth, so supply a crate for doing a deep walk. - fn nested_visit_map(&mut self) -> Option<&hir::map::Map<'tcx>> { - Some(&self.tcx.map) + fn nested_visit_map(&mut self) -> Option<(&hir::map::Map<'tcx>, NestedVisitMode)> { + Some((&self.tcx.map, NestedVisitMode::All)) } fn visit_item(&mut self, item: &'tcx hir::Item) { @@ -432,8 +432,8 @@ fn check_method(&mut self, span: Span, method_def_id: DefId) { impl<'a, 'tcx> Visitor<'tcx> for PrivacyVisitor<'a, 'tcx> { /// We want to visit items in the context of their containing /// module and so forth, so supply a crate for doing a deep walk. - fn nested_visit_map(&mut self) -> Option<&hir::map::Map<'tcx>> { - Some(&self.tcx.map) + fn nested_visit_map(&mut self) -> Option<(&hir::map::Map<'tcx>, NestedVisitMode)> { + Some((&self.tcx.map, NestedVisitMode::All)) } fn visit_item(&mut self, item: &'tcx hir::Item) { @@ -640,8 +640,8 @@ fn visit_expr(&mut self, _: &hir::Expr) {} impl<'a, 'tcx> Visitor<'tcx> for ObsoleteVisiblePrivateTypesVisitor<'a, 'tcx> { /// We want to visit items in the context of their containing /// module and so forth, so supply a crate for doing a deep walk. - fn nested_visit_map(&mut self) -> Option<&hir::map::Map<'tcx>> { - Some(&self.tcx.map) + fn nested_visit_map(&mut self) -> Option<(&hir::map::Map<'tcx>, NestedVisitMode)> { + Some((&self.tcx.map, NestedVisitMode::All)) } fn visit_item(&mut self, item: &'tcx hir::Item) {