1010//!
1111//! SpanUtils is used to manipulate spans. In particular, to extract sub-spans
1212//! from spans (e.g., the span for `bar` from the above example path).
13- //! DumpVisitor walks the AST and processes it, and JsonDumper is used for
13+ //! DumpVisitor walks the AST and processes it, and Dumper is used for
1414//! recording the output.
1515
1616use rustc:: hir:: def:: { Res , DefKind as HirDefKind } ;
@@ -38,7 +38,7 @@ use syntax_pos::*;
3838
3939use crate :: { escape, generated_code, id_from_def_id, id_from_node_id, lower_attributes,
4040 PathCollector , SaveContext } ;
41- use crate :: json_dumper :: { Access , DumpOutput , JsonDumper } ;
41+ use crate :: dumper :: { Access , Dumper } ;
4242use crate :: span_utils:: SpanUtils ;
4343use crate :: sig;
4444
@@ -75,10 +75,10 @@ macro_rules! access_from_vis {
7575 } ;
7676}
7777
78- pub struct DumpVisitor < ' l , ' tcx , ' ll , O : DumpOutput > {
78+ pub struct DumpVisitor < ' l , ' tcx , ' ll > {
7979 save_ctxt : SaveContext < ' l , ' tcx > ,
8080 tcx : TyCtxt < ' tcx > ,
81- dumper : & ' ll mut JsonDumper < O > ,
81+ dumper : & ' ll mut Dumper ,
8282
8383 span : SpanUtils < ' l > ,
8484
@@ -92,11 +92,11 @@ pub struct DumpVisitor<'l, 'tcx, 'll, O: DumpOutput> {
9292 // macro_calls: FxHashSet<Span>,
9393}
9494
95- impl < ' l , ' tcx , ' ll , O : DumpOutput + ' ll > DumpVisitor < ' l , ' tcx , ' ll , O > {
95+ impl < ' l , ' tcx , ' ll > DumpVisitor < ' l , ' tcx , ' ll > {
9696 pub fn new (
9797 save_ctxt : SaveContext < ' l , ' tcx > ,
98- dumper : & ' ll mut JsonDumper < O > ,
99- ) -> DumpVisitor < ' l , ' tcx , ' ll , O > {
98+ dumper : & ' ll mut Dumper ,
99+ ) -> DumpVisitor < ' l , ' tcx , ' ll > {
100100 let span_utils = SpanUtils :: new ( & save_ctxt. tcx . sess ) ;
101101 DumpVisitor {
102102 tcx : save_ctxt. tcx ,
@@ -111,7 +111,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
111111
112112 fn nest_scope < F > ( & mut self , scope_id : NodeId , f : F )
113113 where
114- F : FnOnce ( & mut DumpVisitor < ' l , ' tcx , ' ll , O > ) ,
114+ F : FnOnce ( & mut DumpVisitor < ' l , ' tcx , ' ll > ) ,
115115 {
116116 let parent_scope = self . cur_scope ;
117117 self . cur_scope = scope_id;
@@ -121,7 +121,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
121121
122122 fn nest_tables < F > ( & mut self , item_id : NodeId , f : F )
123123 where
124- F : FnOnce ( & mut DumpVisitor < ' l , ' tcx , ' ll , O > ) ,
124+ F : FnOnce ( & mut DumpVisitor < ' l , ' tcx , ' ll > ) ,
125125 {
126126 let item_def_id = self . tcx . hir ( ) . local_def_id_from_node_id ( item_id) ;
127127 if self . tcx . has_typeck_tables ( item_def_id) {
@@ -1311,7 +1311,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
13111311 }
13121312}
13131313
1314- impl < ' l , ' tcx , ' ll , O : DumpOutput + ' ll > Visitor < ' l > for DumpVisitor < ' l , ' tcx , ' ll , O > {
1314+ impl < ' l , ' tcx , ' ll > Visitor < ' l > for DumpVisitor < ' l , ' tcx , ' ll > {
13151315 fn visit_mod ( & mut self , m : & ' l ast:: Mod , span : Span , attrs : & [ ast:: Attribute ] , id : NodeId ) {
13161316 // Since we handle explicit modules ourselves in visit_item, this should
13171317 // only get called for the root module of a crate.
0 commit comments