@@ -129,7 +129,7 @@ fn resolve_block<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, blk: &'tcx h
129
129
let mut prev_cx = visitor. cx ;
130
130
131
131
visitor. enter_scope ( Scope {
132
- id : blk. hir_id . local_id ,
132
+ local_id : blk. hir_id . local_id ,
133
133
data : ScopeData :: Remainder ( FirstStatementIndex :: new ( i) ) ,
134
134
} ) ;
135
135
visitor. cx . var_parent = visitor. cx . parent ;
@@ -154,7 +154,7 @@ fn resolve_block<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, blk: &'tcx h
154
154
// the first such subscope, which has the block itself as a
155
155
// parent.
156
156
visitor. enter_scope ( Scope {
157
- id : blk. hir_id . local_id ,
157
+ local_id : blk. hir_id . local_id ,
158
158
data : ScopeData :: Remainder ( FirstStatementIndex :: new ( i) ) ,
159
159
} ) ;
160
160
visitor. cx . var_parent = visitor. cx . parent ;
@@ -184,7 +184,7 @@ fn resolve_block<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, blk: &'tcx h
184
184
visitor
185
185
. scope_tree
186
186
. backwards_incompatible_scope
187
- . insert ( local_id, Scope { id : local_id, data : ScopeData :: Node } ) ;
187
+ . insert ( local_id, Scope { local_id, data : ScopeData :: Node } ) ;
188
188
}
189
189
visitor. visit_expr ( tail_expr) ;
190
190
}
@@ -221,7 +221,7 @@ fn resolve_arm<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, arm: &'tcx hir
221
221
}
222
222
223
223
fn resolve_pat < ' tcx > ( visitor : & mut RegionResolutionVisitor < ' tcx > , pat : & ' tcx hir:: Pat < ' tcx > ) {
224
- visitor. record_child_scope ( Scope { id : pat. hir_id . local_id , data : ScopeData :: Node } ) ;
224
+ visitor. record_child_scope ( Scope { local_id : pat. hir_id . local_id , data : ScopeData :: Node } ) ;
225
225
226
226
// If this is a binding then record the lifetime of that binding.
227
227
if let PatKind :: Binding ( ..) = pat. kind {
@@ -485,7 +485,7 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
485
485
} else {
486
486
ScopeData :: IfThen
487
487
} ;
488
- visitor. enter_scope ( Scope { id : then. hir_id . local_id , data } ) ;
488
+ visitor. enter_scope ( Scope { local_id : then. hir_id . local_id , data } ) ;
489
489
visitor. cx . var_parent = visitor. cx . parent ;
490
490
visitor. visit_expr ( cond) ;
491
491
visitor. visit_expr ( then) ;
@@ -500,7 +500,7 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
500
500
} else {
501
501
ScopeData :: IfThen
502
502
} ;
503
- visitor. enter_scope ( Scope { id : then. hir_id . local_id , data } ) ;
503
+ visitor. enter_scope ( Scope { local_id : then. hir_id . local_id , data } ) ;
504
504
visitor. cx . var_parent = visitor. cx . parent ;
505
505
visitor. visit_expr ( cond) ;
506
506
visitor. visit_expr ( then) ;
@@ -516,7 +516,7 @@ fn resolve_expr<'tcx>(visitor: &mut RegionResolutionVisitor<'tcx>, expr: &'tcx h
516
516
517
517
if let hir:: ExprKind :: Yield ( _, source) = & expr. kind {
518
518
// Mark this expr's scope and all parent scopes as containing `yield`.
519
- let mut scope = Scope { id : expr. hir_id . local_id , data : ScopeData :: Node } ;
519
+ let mut scope = Scope { local_id : expr. hir_id . local_id , data : ScopeData :: Node } ;
520
520
loop {
521
521
let span = match expr. kind {
522
522
hir:: ExprKind :: Yield ( expr, hir:: YieldSource :: Await { .. } ) => {
@@ -803,9 +803,9 @@ impl<'tcx> RegionResolutionVisitor<'tcx> {
803
803
// account for the destruction scope representing the scope of
804
804
// the destructors that run immediately after it completes.
805
805
if self . terminating_scopes . contains ( & id) {
806
- self . enter_scope ( Scope { id, data : ScopeData :: Destruction } ) ;
806
+ self . enter_scope ( Scope { local_id : id, data : ScopeData :: Destruction } ) ;
807
807
}
808
- self . enter_scope ( Scope { id, data : ScopeData :: Node } ) ;
808
+ self . enter_scope ( Scope { local_id : id, data : ScopeData :: Node } ) ;
809
809
}
810
810
811
811
fn enter_body ( & mut self , hir_id : hir:: HirId , f : impl FnOnce ( & mut Self ) ) {
@@ -822,8 +822,8 @@ impl<'tcx> RegionResolutionVisitor<'tcx> {
822
822
let outer_pessimistic_yield = mem:: replace ( & mut self . pessimistic_yield , false ) ;
823
823
self . terminating_scopes . insert ( hir_id. local_id ) ;
824
824
825
- self . enter_scope ( Scope { id : hir_id. local_id , data : ScopeData :: CallSite } ) ;
826
- self . enter_scope ( Scope { id : hir_id. local_id , data : ScopeData :: Arguments } ) ;
825
+ self . enter_scope ( Scope { local_id : hir_id. local_id , data : ScopeData :: CallSite } ) ;
826
+ self . enter_scope ( Scope { local_id : hir_id. local_id , data : ScopeData :: Arguments } ) ;
827
827
828
828
f ( self ) ;
829
829
0 commit comments