@@ -122,24 +122,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
122
122
None
123
123
} ;
124
124
125
- let local_def_id = closure_def_id. expect_local ( ) ;
126
-
127
- let mut capture_information = FxIndexMap :: < Place < ' tcx > , ty:: CaptureInfo < ' tcx > > :: default ( ) ;
128
- if !self . tcx . features ( ) . capture_disjoint_fields {
129
- if let Some ( upvars) = self . tcx . upvars_mentioned ( closure_def_id) {
130
- for ( & var_hir_id, _) in upvars. iter ( ) {
131
- let place = self . place_for_root_variable ( local_def_id, var_hir_id) ;
132
-
133
- debug ! ( "seed place {:?}" , place) ;
134
-
135
- let upvar_id = ty:: UpvarId :: new ( var_hir_id, local_def_id) ;
136
- let capture_kind = self . init_capture_kind ( capture_clause, upvar_id, span) ;
137
- let info = ty:: CaptureInfo { expr_id : None , capture_kind } ;
138
-
139
- capture_information. insert ( place, info) ;
140
- }
141
- }
142
- }
125
+ let capture_information = FxIndexMap :: < Place < ' tcx > , ty:: CaptureInfo < ' tcx > > :: default ( ) ;
143
126
144
127
let body_owner_def_id = self . tcx . hir ( ) . body_owner_def_id ( body. id ( ) ) ;
145
128
assert_eq ! ( body_owner_def_id. to_def_id( ) , closure_def_id) ;
@@ -482,20 +465,6 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
482
465
}
483
466
}
484
467
485
- fn place_for_root_variable (
486
- & self ,
487
- closure_def_id : LocalDefId ,
488
- var_hir_id : hir:: HirId ,
489
- ) -> Place < ' tcx > {
490
- let upvar_id = ty:: UpvarId :: new ( var_hir_id, closure_def_id) ;
491
-
492
- Place {
493
- base_ty : self . node_ty ( var_hir_id) ,
494
- base : PlaceBase :: Upvar ( upvar_id) ,
495
- projections : Default :: default ( ) ,
496
- }
497
- }
498
-
499
468
fn should_log_capture_analysis ( & self , closure_def_id : DefId ) -> bool {
500
469
self . tcx . has_attr ( closure_def_id, sym:: rustc_capture_analysis)
501
470
}
0 commit comments