@@ -785,21 +785,19 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
785
785
}
786
786
}
787
787
788
+ fn dump_path_ref ( & mut self , id : NodeId , path : & ast:: Path ) {
789
+ let path_data = self . save_ctxt . get_path_data ( id, path) ;
790
+ if let Some ( path_data) = path_data {
791
+ self . dumper . dump_ref ( path_data) ;
792
+ }
793
+ }
794
+
788
795
fn process_path ( & mut self , id : NodeId , path : & ' l ast:: Path ) {
789
796
debug ! ( "process_path {:?}" , path) ;
790
- let path_data = self . save_ctxt . get_path_data ( id, path) ;
791
- if generated_code ( path. span ) && path_data. is_none ( ) {
797
+ if generated_code ( path. span ) {
792
798
return ;
793
799
}
794
-
795
- let path_data = match path_data {
796
- Some ( pd) => pd,
797
- None => {
798
- return ;
799
- }
800
- } ;
801
-
802
- self . dumper . dump_ref ( path_data) ;
800
+ self . dump_path_ref ( id, path) ;
803
801
804
802
// Type parameters
805
803
for seg in & path. segments {
@@ -1508,6 +1506,13 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> Visitor<'l> for DumpVisitor<'l, 'tc
1508
1506
} ) ;
1509
1507
}
1510
1508
}
1509
+ HirDef :: StructCtor ( ..) | HirDef :: VariantCtor ( ..) |
1510
+ HirDef :: Const ( ..) | HirDef :: AssociatedConst ( ..) |
1511
+ HirDef :: Struct ( ..) | HirDef :: Variant ( ..) |
1512
+ HirDef :: TyAlias ( ..) | HirDef :: AssociatedTy ( ..) |
1513
+ HirDef :: SelfTy ( ..) => {
1514
+ self . dump_path_ref ( id, & ast:: Path :: from_ident ( sp, i) ) ;
1515
+ }
1511
1516
def => error ! ( "unexpected definition kind when processing collected idents: {:?}" ,
1512
1517
def) ,
1513
1518
}
0 commit comments