@@ -94,7 +94,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
94
94
}
95
95
}
96
96
97
- fn lookup_and_handle_method ( & mut self , id : ast :: NodeId ) {
97
+ fn lookup_and_handle_method ( & mut self , id : hir :: ItemLocalId ) {
98
98
self . check_def_id ( self . tables . type_dependent_defs [ & id] . def_id ( ) ) ;
99
99
}
100
100
@@ -119,6 +119,8 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
119
119
120
120
fn handle_field_pattern_match ( & mut self , lhs : & hir:: Pat , def : Def ,
121
121
pats : & [ codemap:: Spanned < hir:: FieldPat > ] ) {
122
+
123
+
122
124
let variant = match self . tables . node_id_to_type ( lhs. id ) . sty {
123
125
ty:: TyAdt ( adt, _) => adt. variant_of_def ( def) ,
124
126
_ => span_bug ! ( lhs. span, "non-ADT in struct pattern" )
@@ -235,11 +237,11 @@ impl<'a, 'tcx> Visitor<'tcx> for MarkSymbolVisitor<'a, 'tcx> {
235
237
fn visit_expr ( & mut self , expr : & ' tcx hir:: Expr ) {
236
238
match expr. node {
237
239
hir:: ExprPath ( ref qpath @ hir:: QPath :: TypeRelative ( ..) ) => {
238
- let def = self . tables . qpath_def ( qpath, expr. id ) ;
240
+ let def = self . tables . qpath_def ( qpath, expr. hir_id ) ;
239
241
self . handle_definition ( def) ;
240
242
}
241
243
hir:: ExprMethodCall ( ..) => {
242
- self . lookup_and_handle_method ( expr. id ) ;
244
+ self . lookup_and_handle_method ( expr. hir_id . local_id ) ;
243
245
}
244
246
hir:: ExprField ( ref lhs, ref name) => {
245
247
self . handle_field_access ( & lhs, name. node ) ;
@@ -282,7 +284,7 @@ impl<'a, 'tcx> Visitor<'tcx> for MarkSymbolVisitor<'a, 'tcx> {
282
284
self . handle_field_pattern_match ( pat, path. def , fields) ;
283
285
}
284
286
PatKind :: Path ( ref qpath @ hir:: QPath :: TypeRelative ( ..) ) => {
285
- let def = self . tables . qpath_def ( qpath, pat. id ) ;
287
+ let def = self . tables . qpath_def ( qpath, pat. hir_id ) ;
286
288
self . handle_definition ( def) ;
287
289
}
288
290
_ => ( )
@@ -425,7 +427,7 @@ fn find_live<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
425
427
let mut symbol_visitor = MarkSymbolVisitor {
426
428
worklist,
427
429
tcx,
428
- tables : & ty:: TypeckTables :: empty ( ) ,
430
+ tables : & ty:: TypeckTables :: empty ( DefId :: invalid ( ) ) ,
429
431
live_symbols : box FxHashSet ( ) ,
430
432
struct_has_extern_repr : false ,
431
433
ignore_non_const_paths : false ,
0 commit comments