Replace NestedVisitorMap with NestedFilter
This commit is contained in:
parent
bd3cb52565
commit
45db716902
57 changed files with 258 additions and 512 deletions
|
@ -21,7 +21,7 @@ use rustc_hir::def::{DefKind as HirDefKind, Res};
|
|||
use rustc_hir::def_id::{DefId, LocalDefId, CRATE_DEF_ID};
|
||||
use rustc_hir::intravisit::{self, Visitor};
|
||||
use rustc_hir_pretty::{bounds_to_string, fn_to_string, generic_params_to_string, ty_to_string};
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::hir::nested_filter;
|
||||
use rustc_middle::span_bug;
|
||||
use rustc_middle::ty::{self, DefIdTree, TyCtxt};
|
||||
use rustc_session::config::Input;
|
||||
|
@ -1137,10 +1137,10 @@ impl<'tcx> DumpVisitor<'tcx> {
|
|||
}
|
||||
|
||||
impl<'tcx> Visitor<'tcx> for DumpVisitor<'tcx> {
|
||||
type Map = Map<'tcx>;
|
||||
type NestedFilter = nested_filter::All;
|
||||
|
||||
fn nested_visit_map(&mut self) -> intravisit::NestedVisitorMap<Self::Map> {
|
||||
intravisit::NestedVisitorMap::All(self.tcx.hir())
|
||||
fn nested_visit_map(&mut self) -> Self::Map {
|
||||
self.tcx.hir()
|
||||
}
|
||||
|
||||
fn visit_item(&mut self, item: &'tcx hir::Item<'tcx>) {
|
||||
|
|
|
@ -18,7 +18,7 @@ use rustc_hir::def_id::{DefId, LOCAL_CRATE};
|
|||
use rustc_hir::intravisit::{self, Visitor};
|
||||
use rustc_hir::Node;
|
||||
use rustc_hir_pretty::{enum_def_to_string, fn_to_string, ty_to_string};
|
||||
use rustc_middle::hir::map::Map;
|
||||
use rustc_middle::hir::nested_filter;
|
||||
use rustc_middle::middle::privacy::AccessLevels;
|
||||
use rustc_middle::ty::{self, print::with_no_trimmed_paths, DefIdTree, TyCtxt};
|
||||
use rustc_middle::{bug, span_bug};
|
||||
|
@ -859,10 +859,10 @@ impl<'l> PathCollector<'l> {
|
|||
}
|
||||
|
||||
impl<'l> Visitor<'l> for PathCollector<'l> {
|
||||
type Map = Map<'l>;
|
||||
type NestedFilter = nested_filter::All;
|
||||
|
||||
fn nested_visit_map(&mut self) -> intravisit::NestedVisitorMap<Self::Map> {
|
||||
intravisit::NestedVisitorMap::All(self.tcx.hir())
|
||||
fn nested_visit_map(&mut self) -> Self::Map {
|
||||
self.tcx.hir()
|
||||
}
|
||||
|
||||
fn visit_pat(&mut self, p: &'l hir::Pat<'l>) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue