@@ -677,7 +677,7 @@ fn check_for_loop_explicit_counter<'a, 'tcx>(
677
677
678
678
// For each candidate, check the parent block to see if
679
679
// it's initialized to zero at the start of the loop.
680
- let map = & cx. tcx . map ;
680
+ let map = & cx. tcx . hir ;
681
681
let parent_scope = map. get_enclosing_scope ( expr. id ) . and_then ( |id| map. get_enclosing_scope ( id) ) ;
682
682
if let Some ( parent_id) = parent_scope {
683
683
if let NodeBlock ( block) = map. get ( parent_id) {
@@ -794,7 +794,7 @@ impl<'a, 'tcx: 'a> Visitor<'tcx> for UsedVisitor<'a, 'tcx> {
794
794
walk_expr ( self , expr) ;
795
795
}
796
796
fn nested_visit_map < ' this > ( & ' this mut self ) -> NestedVisitorMap < ' this , ' tcx > {
797
- NestedVisitorMap :: All ( & self . cx . tcx . map )
797
+ NestedVisitorMap :: All ( & self . cx . tcx . hir )
798
798
}
799
799
}
800
800
@@ -822,7 +822,7 @@ impl<'a, 'tcx> Visitor<'tcx> for VarVisitor<'a, 'tcx> {
822
822
match def {
823
823
Def :: Local ( ..) | Def :: Upvar ( ..) => {
824
824
let def_id = def. def_id( ) ;
825
- let node_id = self . cx. tcx. map . as_local_node_id( def_id) . unwrap( ) ;
825
+ let node_id = self . cx. tcx. hir . as_local_node_id( def_id) . unwrap( ) ;
826
826
827
827
let extent = self . cx. tcx. region_maps. var_scope( node_id) ;
828
828
self . indexed. insert( seqvar. segments[ 0 ] . name, Some ( extent) ) ;
@@ -844,7 +844,7 @@ impl<'a, 'tcx> Visitor<'tcx> for VarVisitor<'a, 'tcx> {
844
844
walk_expr ( self , expr) ;
845
845
}
846
846
fn nested_visit_map < ' this > ( & ' this mut self ) -> NestedVisitorMap < ' this , ' tcx > {
847
- NestedVisitorMap :: All ( & self . cx . tcx . map )
847
+ NestedVisitorMap :: All ( & self . cx . tcx . hir )
848
848
}
849
849
}
850
850
@@ -886,7 +886,7 @@ impl<'a, 'tcx> Visitor<'tcx> for VarUsedAfterLoopVisitor<'a, 'tcx> {
886
886
walk_expr ( self , expr) ;
887
887
}
888
888
fn nested_visit_map < ' this > ( & ' this mut self ) -> NestedVisitorMap < ' this , ' tcx > {
889
- NestedVisitorMap :: All ( & self . cx . tcx . map )
889
+ NestedVisitorMap :: All ( & self . cx . tcx . hir )
890
890
}
891
891
}
892
892
@@ -1029,7 +1029,7 @@ impl<'a, 'tcx> Visitor<'tcx> for IncrementVisitor<'a, 'tcx> {
1029
1029
walk_expr ( self , expr) ;
1030
1030
}
1031
1031
fn nested_visit_map < ' this > ( & ' this mut self ) -> NestedVisitorMap < ' this , ' tcx > {
1032
- NestedVisitorMap :: All ( & self . cx . tcx . map )
1032
+ NestedVisitorMap :: All ( & self . cx . tcx . hir )
1033
1033
}
1034
1034
}
1035
1035
@@ -1116,15 +1116,15 @@ impl<'a, 'tcx> Visitor<'tcx> for InitializeVisitor<'a, 'tcx> {
1116
1116
walk_expr ( self , expr) ;
1117
1117
}
1118
1118
fn nested_visit_map < ' this > ( & ' this mut self ) -> NestedVisitorMap < ' this , ' tcx > {
1119
- NestedVisitorMap :: All ( & self . cx . tcx . map )
1119
+ NestedVisitorMap :: All ( & self . cx . tcx . hir )
1120
1120
}
1121
1121
}
1122
1122
1123
1123
fn var_def_id ( cx : & LateContext , expr : & Expr ) -> Option < NodeId > {
1124
1124
if let ExprPath ( ref qpath) = expr. node {
1125
1125
let path_res = cx. tables . qpath_def ( qpath, expr. id ) ;
1126
1126
if let Def :: Local ( def_id) = path_res {
1127
- let node_id = cx. tcx . map . as_local_node_id ( def_id) . expect ( "That DefId should be valid" ) ;
1127
+ let node_id = cx. tcx . hir . as_local_node_id ( def_id) . expect ( "That DefId should be valid" ) ;
1128
1128
return Some ( node_id) ;
1129
1129
}
1130
1130
}
0 commit comments