@@ -225,7 +225,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
225225 collector. visit_pat ( & arg. pat ) ;
226226
227227 for ( id, ident, ..) in collector. collected_idents {
228- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( id) ;
228+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( id) ;
229229 let typ = match self . save_ctxt . tables . node_type_opt ( hir_id) {
230230 Some ( s) => s. to_string ( ) ,
231231 None => continue ,
@@ -268,7 +268,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
268268 ) {
269269 debug ! ( "process_method: {}:{}" , id, ident) ;
270270
271- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( id) ;
271+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( id) ;
272272 self . nest_tables ( id, |v| {
273273 if let Some ( mut method_data) = v. save_ctxt . get_method_data ( id, ident, span) {
274274 v. process_formals ( & sig. decl . inputs , & method_data. qualname ) ;
@@ -308,7 +308,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
308308 fn process_struct_field_def ( & mut self , field : & ast:: StructField , parent_id : NodeId ) {
309309 let field_data = self . save_ctxt . get_field_data ( field, parent_id) ;
310310 if let Some ( field_data) = field_data {
311- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( field. id ) ;
311+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( field. id ) ;
312312 self . dumper . dump_def ( & access_from ! ( self . save_ctxt, field, hir_id) , field_data) ;
313313 }
314314 }
@@ -360,7 +360,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
360360 ty_params : & ' l ast:: Generics ,
361361 body : Option < & ' l ast:: Block > ,
362362 ) {
363- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( item. id ) ;
363+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( item. id ) ;
364364 self . nest_tables ( item. id , |v| {
365365 if let Some ( fn_data) = v. save_ctxt . get_item_data ( item) {
366366 down_cast_data ! ( fn_data, DefData , item. span) ;
@@ -402,7 +402,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
402402 typ : & ' l ast:: Ty ,
403403 expr : Option < & ' l ast:: Expr > ,
404404 ) {
405- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( item. id ) ;
405+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( item. id ) ;
406406 self . nest_tables ( item. id , |v| {
407407 if let Some ( var_data) = v. save_ctxt . get_item_data ( item) {
408408 down_cast_data ! ( var_data, DefData , item. span) ;
@@ -429,7 +429,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
429429 if !self . span . filter_generated ( ident. span ) {
430430 let sig = sig:: assoc_const_signature ( id, ident. name , typ, expr, & self . save_ctxt ) ;
431431 let span = self . span_from_span ( ident. span ) ;
432- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( id) ;
432+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( id) ;
433433
434434 self . dumper . dump_def (
435435 & access_from_vis ! ( self . save_ctxt, vis, hir_id) ,
@@ -503,7 +503,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
503503
504504 if !self . span . filter_generated ( item. ident . span ) {
505505 let span = self . span_from_span ( item. ident . span ) ;
506- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( item. id ) ;
506+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( item. id ) ;
507507 self . dumper . dump_def (
508508 & access_from ! ( self . save_ctxt, item, hir_id) ,
509509 Def {
@@ -546,7 +546,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
546546 } ;
547547 down_cast_data ! ( enum_data, DefData , item. span) ;
548548
549- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( item. id ) ;
549+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( item. id ) ;
550550 let access = access_from ! ( self . save_ctxt, item, hir_id) ;
551551
552552 for variant in & enum_definition. variants {
@@ -699,7 +699,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
699699 let id = id_from_node_id ( item. id , & self . save_ctxt ) ;
700700 let span = self . span_from_span ( item. ident . span ) ;
701701 let children = methods. iter ( ) . map ( |i| id_from_node_id ( i. id , & self . save_ctxt ) ) . collect ( ) ;
702- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( item. id ) ;
702+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( item. id ) ;
703703 self . dumper . dump_def (
704704 & access_from ! ( self . save_ctxt, item, hir_id) ,
705705 Def {
@@ -759,7 +759,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
759759 fn process_mod ( & mut self , item : & ast:: Item ) {
760760 if let Some ( mod_data) = self . save_ctxt . get_item_data ( item) {
761761 down_cast_data ! ( mod_data, DefData , item. span) ;
762- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( item. id ) ;
762+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( item. id ) ;
763763 self . dumper . dump_def ( & access_from ! ( self . save_ctxt, item, hir_id) , mod_data) ;
764764 }
765765 }
@@ -864,7 +864,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
864864 match p. kind {
865865 PatKind :: Struct ( ref _path, ref fields, _) => {
866866 // FIXME do something with _path?
867- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( p. id ) ;
867+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( p. id ) ;
868868 let adt = match self . save_ctxt . tables . node_type_opt ( hir_id) {
869869 Some ( ty) if ty. ty_adt_def ( ) . is_some ( ) => ty. ty_adt_def ( ) . unwrap ( ) ,
870870 _ => {
@@ -903,7 +903,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
903903 for ( id, ident, _) in collector. collected_idents {
904904 match self . save_ctxt . get_path_res ( id) {
905905 Res :: Local ( hir_id) => {
906- let id = self . tcx . hir ( ) . hir_to_node_id ( hir_id) ;
906+ let id = self . tcx . hir ( ) . hir_id_to_node_id ( hir_id) ;
907907 let typ = self
908908 . save_ctxt
909909 . tables
@@ -1126,7 +1126,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
11261126
11271127 // The access is calculated using the current tree ID, but with the root tree's visibility
11281128 // (since nested trees don't have their own visibility).
1129- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( id) ;
1129+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( id) ;
11301130 let access = access_from ! ( self . save_ctxt, root_item, hir_id) ;
11311131
11321132 // The parent `DefId` of a given use tree is always the enclosing item.
@@ -1321,7 +1321,7 @@ impl<'l, 'tcx> Visitor<'l> for DumpVisitor<'l, 'tcx> {
13211321 if !self . span . filter_generated ( item. ident . span ) {
13221322 let span = self . span_from_span ( item. ident . span ) ;
13231323 let id = id_from_node_id ( item. id , & self . save_ctxt ) ;
1324- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( item. id ) ;
1324+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( item. id ) ;
13251325
13261326 self . dumper . dump_def (
13271327 & access_from ! ( self . save_ctxt, item, hir_id) ,
@@ -1420,7 +1420,7 @@ impl<'l, 'tcx> Visitor<'l> for DumpVisitor<'l, 'tcx> {
14201420 self . process_macro_use ( ex. span ) ;
14211421 match ex. kind {
14221422 ast:: ExprKind :: Struct ( ref path, ref fields, ref base) => {
1423- let expr_hir_id = self . save_ctxt . tcx . hir ( ) . node_to_hir_id ( ex. id ) ;
1423+ let expr_hir_id = self . save_ctxt . tcx . hir ( ) . node_id_to_hir_id ( ex. id ) ;
14241424 let hir_expr = self . save_ctxt . tcx . hir ( ) . expect_expr ( expr_hir_id) ;
14251425 let adt = match self . save_ctxt . tables . expr_ty_opt ( & hir_expr) {
14261426 Some ( ty) if ty. ty_adt_def ( ) . is_some ( ) => ty. ty_adt_def ( ) . unwrap ( ) ,
@@ -1429,7 +1429,7 @@ impl<'l, 'tcx> Visitor<'l> for DumpVisitor<'l, 'tcx> {
14291429 return ;
14301430 }
14311431 } ;
1432- let node_id = self . save_ctxt . tcx . hir ( ) . hir_to_node_id ( hir_expr. hir_id ) ;
1432+ let node_id = self . save_ctxt . tcx . hir ( ) . hir_id_to_node_id ( hir_expr. hir_id ) ;
14331433 let res = self . save_ctxt . get_path_res ( node_id) ;
14341434 self . process_struct_lit ( ex, path, fields, adt. variant_of_res ( res) , base)
14351435 }
@@ -1514,7 +1514,7 @@ impl<'l, 'tcx> Visitor<'l> for DumpVisitor<'l, 'tcx> {
15141514 }
15151515
15161516 fn visit_foreign_item ( & mut self , item : & ' l ast:: ForeignItem ) {
1517- let hir_id = self . tcx . hir ( ) . node_to_hir_id ( item. id ) ;
1517+ let hir_id = self . tcx . hir ( ) . node_id_to_hir_id ( item. id ) ;
15181518 let access = access_from ! ( self . save_ctxt, item, hir_id) ;
15191519
15201520 match item. kind {
0 commit comments