@@ -225,7 +225,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
225
225
collector. visit_pat ( & arg. pat ) ;
226
226
227
227
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) ;
229
229
let typ = match self . save_ctxt . tables . node_type_opt ( hir_id) {
230
230
Some ( s) => s. to_string ( ) ,
231
231
None => continue ,
@@ -268,7 +268,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
268
268
) {
269
269
debug ! ( "process_method: {}:{}" , id, ident) ;
270
270
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) ;
272
272
self . nest_tables ( id, |v| {
273
273
if let Some ( mut method_data) = v. save_ctxt . get_method_data ( id, ident, span) {
274
274
v. process_formals ( & sig. decl . inputs , & method_data. qualname ) ;
@@ -308,7 +308,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
308
308
fn process_struct_field_def ( & mut self , field : & ast:: StructField , parent_id : NodeId ) {
309
309
let field_data = self . save_ctxt . get_field_data ( field, parent_id) ;
310
310
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 ) ;
312
312
self . dumper . dump_def ( & access_from ! ( self . save_ctxt, field, hir_id) , field_data) ;
313
313
}
314
314
}
@@ -360,7 +360,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
360
360
ty_params : & ' l ast:: Generics ,
361
361
body : Option < & ' l ast:: Block > ,
362
362
) {
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 ) ;
364
364
self . nest_tables ( item. id , |v| {
365
365
if let Some ( fn_data) = v. save_ctxt . get_item_data ( item) {
366
366
down_cast_data ! ( fn_data, DefData , item. span) ;
@@ -402,7 +402,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
402
402
typ : & ' l ast:: Ty ,
403
403
expr : Option < & ' l ast:: Expr > ,
404
404
) {
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 ) ;
406
406
self . nest_tables ( item. id , |v| {
407
407
if let Some ( var_data) = v. save_ctxt . get_item_data ( item) {
408
408
down_cast_data ! ( var_data, DefData , item. span) ;
@@ -429,7 +429,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
429
429
if !self . span . filter_generated ( ident. span ) {
430
430
let sig = sig:: assoc_const_signature ( id, ident. name , typ, expr, & self . save_ctxt ) ;
431
431
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) ;
433
433
434
434
self . dumper . dump_def (
435
435
& access_from_vis ! ( self . save_ctxt, vis, hir_id) ,
@@ -503,7 +503,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
503
503
504
504
if !self . span . filter_generated ( item. ident . span ) {
505
505
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 ) ;
507
507
self . dumper . dump_def (
508
508
& access_from ! ( self . save_ctxt, item, hir_id) ,
509
509
Def {
@@ -546,7 +546,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
546
546
} ;
547
547
down_cast_data ! ( enum_data, DefData , item. span) ;
548
548
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 ) ;
550
550
let access = access_from ! ( self . save_ctxt, item, hir_id) ;
551
551
552
552
for variant in & enum_definition. variants {
@@ -699,7 +699,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
699
699
let id = id_from_node_id ( item. id , & self . save_ctxt ) ;
700
700
let span = self . span_from_span ( item. ident . span ) ;
701
701
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 ) ;
703
703
self . dumper . dump_def (
704
704
& access_from ! ( self . save_ctxt, item, hir_id) ,
705
705
Def {
@@ -759,7 +759,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
759
759
fn process_mod ( & mut self , item : & ast:: Item ) {
760
760
if let Some ( mod_data) = self . save_ctxt . get_item_data ( item) {
761
761
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 ) ;
763
763
self . dumper . dump_def ( & access_from ! ( self . save_ctxt, item, hir_id) , mod_data) ;
764
764
}
765
765
}
@@ -864,7 +864,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
864
864
match p. kind {
865
865
PatKind :: Struct ( ref _path, ref fields, _) => {
866
866
// 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 ) ;
868
868
let adt = match self . save_ctxt . tables . node_type_opt ( hir_id) {
869
869
Some ( ty) if ty. ty_adt_def ( ) . is_some ( ) => ty. ty_adt_def ( ) . unwrap ( ) ,
870
870
_ => {
@@ -903,7 +903,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
903
903
for ( id, ident, _) in collector. collected_idents {
904
904
match self . save_ctxt . get_path_res ( id) {
905
905
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) ;
907
907
let typ = self
908
908
. save_ctxt
909
909
. tables
@@ -1126,7 +1126,7 @@ impl<'l, 'tcx> DumpVisitor<'l, 'tcx> {
1126
1126
1127
1127
// The access is calculated using the current tree ID, but with the root tree's visibility
1128
1128
// (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) ;
1130
1130
let access = access_from ! ( self . save_ctxt, root_item, hir_id) ;
1131
1131
1132
1132
// 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> {
1321
1321
if !self . span . filter_generated ( item. ident . span ) {
1322
1322
let span = self . span_from_span ( item. ident . span ) ;
1323
1323
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 ) ;
1325
1325
1326
1326
self . dumper . dump_def (
1327
1327
& access_from ! ( self . save_ctxt, item, hir_id) ,
@@ -1420,7 +1420,7 @@ impl<'l, 'tcx> Visitor<'l> for DumpVisitor<'l, 'tcx> {
1420
1420
self . process_macro_use ( ex. span ) ;
1421
1421
match ex. kind {
1422
1422
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 ) ;
1424
1424
let hir_expr = self . save_ctxt . tcx . hir ( ) . expect_expr ( expr_hir_id) ;
1425
1425
let adt = match self . save_ctxt . tables . expr_ty_opt ( & hir_expr) {
1426
1426
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> {
1429
1429
return ;
1430
1430
}
1431
1431
} ;
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 ) ;
1433
1433
let res = self . save_ctxt . get_path_res ( node_id) ;
1434
1434
self . process_struct_lit ( ex, path, fields, adt. variant_of_res ( res) , base)
1435
1435
}
@@ -1514,7 +1514,7 @@ impl<'l, 'tcx> Visitor<'l> for DumpVisitor<'l, 'tcx> {
1514
1514
}
1515
1515
1516
1516
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 ) ;
1518
1518
let access = access_from ! ( self . save_ctxt, item, hir_id) ;
1519
1519
1520
1520
match item. kind {
0 commit comments