@@ -94,7 +94,7 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
9494 }
9595 }
9696
97- fn lookup_and_handle_method ( & mut self , id : ast :: NodeId ) {
97+ fn lookup_and_handle_method ( & mut self , id : hir :: ItemLocalId ) {
9898 self . check_def_id ( self . tables . type_dependent_defs [ & id] . def_id ( ) ) ;
9999 }
100100
@@ -119,6 +119,8 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
119119
120120 fn handle_field_pattern_match ( & mut self , lhs : & hir:: Pat , def : Def ,
121121 pats : & [ codemap:: Spanned < hir:: FieldPat > ] ) {
122+
123+
122124 let variant = match self . tables . node_id_to_type ( lhs. id ) . sty {
123125 ty:: TyAdt ( adt, _) => adt. variant_of_def ( def) ,
124126 _ => span_bug ! ( lhs. span, "non-ADT in struct pattern" )
@@ -235,11 +237,11 @@ impl<'a, 'tcx> Visitor<'tcx> for MarkSymbolVisitor<'a, 'tcx> {
235237 fn visit_expr ( & mut self , expr : & ' tcx hir:: Expr ) {
236238 match expr. node {
237239 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 ) ;
239241 self . handle_definition ( def) ;
240242 }
241243 hir:: ExprMethodCall ( ..) => {
242- self . lookup_and_handle_method ( expr. id ) ;
244+ self . lookup_and_handle_method ( expr. hir_id . local_id ) ;
243245 }
244246 hir:: ExprField ( ref lhs, ref name) => {
245247 self . handle_field_access ( & lhs, name. node ) ;
@@ -282,7 +284,7 @@ impl<'a, 'tcx> Visitor<'tcx> for MarkSymbolVisitor<'a, 'tcx> {
282284 self . handle_field_pattern_match ( pat, path. def , fields) ;
283285 }
284286 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 ) ;
286288 self . handle_definition ( def) ;
287289 }
288290 _ => ( )
@@ -425,7 +427,7 @@ fn find_live<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>,
425427 let mut symbol_visitor = MarkSymbolVisitor {
426428 worklist,
427429 tcx,
428- tables : & ty:: TypeckTables :: empty ( ) ,
430+ tables : & ty:: TypeckTables :: empty ( DefId :: invalid ( ) ) ,
429431 live_symbols : box FxHashSet ( ) ,
430432 struct_has_extern_repr : false ,
431433 ignore_non_const_paths : false ,
0 commit comments