@@ -123,7 +123,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
123123 where
124124 F : FnOnce ( & mut DumpVisitor < ' l , ' tcx , ' ll , O > ) ,
125125 {
126- let item_def_id = self . tcx . hir ( ) . local_def_id ( item_id) ;
126+ 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) {
128128 let tables = self . tcx . typeck_tables_of ( item_def_id) ;
129129 let old_tables = self . save_ctxt . tables ;
@@ -436,7 +436,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
436436 attrs : & ' l [ Attribute ] ,
437437 ) {
438438 let qualname = format ! ( "::{}" ,
439- self . tcx. def_path_str( self . tcx. hir( ) . local_def_id ( id) ) ) ;
439+ self . tcx. def_path_str( self . tcx. hir( ) . local_def_id_from_node_id ( id) ) ) ;
440440
441441 if !self . span . filter_generated ( ident. span ) {
442442 let sig = sig:: assoc_const_signature ( id, ident. name , typ, expr, & self . save_ctxt ) ;
@@ -481,7 +481,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
481481 debug ! ( "process_struct {:?} {:?}" , item, item. span) ;
482482 let name = item. ident . to_string ( ) ;
483483 let qualname = format ! ( "::{}" ,
484- self . tcx. def_path_str( self . tcx. hir( ) . local_def_id ( item. id) ) ) ;
484+ self . tcx. def_path_str( self . tcx. hir( ) . local_def_id_from_node_id ( item. id) ) ) ;
485485
486486 let kind = match item. node {
487487 ast:: ItemKind :: Struct ( _, _) => DefKind :: Struct ,
@@ -683,7 +683,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
683683 self . process_generic_params ( generics, "" , item. id ) ;
684684 for impl_item in impl_items {
685685 let map = & self . tcx . hir ( ) ;
686- self . process_impl_item ( impl_item, map. local_def_id ( item. id ) ) ;
686+ self . process_impl_item ( impl_item, map. local_def_id_from_node_id ( item. id ) ) ;
687687 }
688688 }
689689
@@ -696,7 +696,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
696696 ) {
697697 let name = item. ident . to_string ( ) ;
698698 let qualname = format ! ( "::{}" ,
699- self . tcx. def_path_str( self . tcx. hir( ) . local_def_id ( item. id) ) ) ;
699+ self . tcx. def_path_str( self . tcx. hir( ) . local_def_id_from_node_id ( item. id) ) ) ;
700700 let mut val = name. clone ( ) ;
701701 if !generics. params . is_empty ( ) {
702702 val. push_str ( & generic_params_to_string ( & generics. params ) ) ;
@@ -764,7 +764,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
764764 self . process_generic_params ( generics, & qualname, item. id ) ;
765765 for method in methods {
766766 let map = & self . tcx . hir ( ) ;
767- self . process_trait_item ( method, map. local_def_id ( item. id ) )
767+ self . process_trait_item ( method, map. local_def_id_from_node_id ( item. id ) )
768768 }
769769 }
770770
@@ -1109,7 +1109,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
11091109 // FIXME do something with _bounds (for type refs)
11101110 let name = trait_item. ident . name . to_string ( ) ;
11111111 let qualname = format ! ( "::{}" ,
1112- self . tcx. def_path_str( self . tcx. hir( ) . local_def_id ( trait_item. id) ) ) ;
1112+ self . tcx. def_path_str( self . tcx. hir( ) . local_def_id_from_node_id ( trait_item. id) ) ) ;
11131113
11141114 if !self . span . filter_generated ( trait_item. ident . span ) {
11151115 let span = self . span_from_span ( trait_item. ident . span ) ;
@@ -1261,7 +1261,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
12611261 } ;
12621262
12631263 // Make a comma-separated list of names of imported modules.
1264- let def_id = self . tcx . hir ( ) . local_def_id ( id) ;
1264+ let def_id = self . tcx . hir ( ) . local_def_id_from_node_id ( id) ;
12651265 let names = self . tcx . names_imported_by_glob_use ( def_id) ;
12661266 let names: Vec < _ > = names. iter ( ) . map ( |n| n. to_string ( ) ) . collect ( ) ;
12671267
@@ -1318,7 +1318,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> Visitor<'l> for DumpVisitor<'l, 'tcx, '
13181318 assert_eq ! ( id, ast:: CRATE_NODE_ID ) ;
13191319
13201320 let qualname = format ! ( "::{}" ,
1321- self . tcx. def_path_str( self . tcx. hir( ) . local_def_id ( id) ) ) ;
1321+ self . tcx. def_path_str( self . tcx. hir( ) . local_def_id_from_node_id ( id) ) ) ;
13221322
13231323 let cm = self . tcx . sess . source_map ( ) ;
13241324 let filename = cm. span_to_filename ( span) ;
@@ -1408,7 +1408,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> Visitor<'l> for DumpVisitor<'l, 'tcx, '
14081408 }
14091409 Ty ( ref ty, ref ty_params) => {
14101410 let qualname = format ! ( "::{}" ,
1411- self . tcx. def_path_str( self . tcx. hir( ) . local_def_id ( item. id) ) ) ;
1411+ self . tcx. def_path_str( self . tcx. hir( ) . local_def_id_from_node_id ( item. id) ) ) ;
14121412 let value = ty_to_string ( & ty) ;
14131413 if !self . span . filter_generated ( item. ident . span ) {
14141414 let span = self . span_from_span ( item. ident . span ) ;
@@ -1439,7 +1439,7 @@ impl<'l, 'tcx, 'll, O: DumpOutput + 'll> Visitor<'l> for DumpVisitor<'l, 'tcx, '
14391439 }
14401440 Existential ( ref _bounds, ref ty_params) => {
14411441 let qualname = format ! ( "::{}" ,
1442- self . tcx. def_path_str( self . tcx. hir( ) . local_def_id ( item. id) ) ) ;
1442+ self . tcx. def_path_str( self . tcx. hir( ) . local_def_id_from_node_id ( item. id) ) ) ;
14431443 // FIXME do something with _bounds
14441444 let value = String :: new ( ) ;
14451445 if !self . span . filter_generated ( item. ident . span ) {
0 commit comments