1- use crate :: borrow_check:: location:: LocationTable ;
21use crate :: borrow_check:: nll:: region_infer:: values:: { self , PointIndex , RegionValueElements } ;
32use crate :: borrow_check:: nll:: type_check:: liveness:: local_use_map:: LocalUseMap ;
43use crate :: borrow_check:: nll:: type_check:: liveness:: polonius;
@@ -38,7 +37,6 @@ pub(super) fn trace(
3837 flow_inits : & mut FlowAtLocation < ' tcx , MaybeInitializedPlaces < ' _ , ' tcx > > ,
3938 move_data : & MoveData < ' tcx > ,
4039 live_locals : Vec < Local > ,
41- location_table : & LocationTable ,
4240) {
4341 debug ! ( "trace()" ) ;
4442
@@ -52,7 +50,6 @@ pub(super) fn trace(
5250 local_use_map,
5351 move_data,
5452 drop_data : FxHashMap :: default ( ) ,
55- location_table,
5653 } ;
5754
5855 LivenessResults :: new ( cx) . compute_for_all_locals ( live_locals) ;
@@ -82,9 +79,6 @@ struct LivenessContext<'me, 'typeck, 'flow, 'tcx> {
8279 /// Index indicating where each variable is assigned, used, or
8380 /// dropped.
8481 local_use_map : & ' me LocalUseMap ,
85-
86- /// Maps between a MIR Location and a LocationIndex
87- location_table : & ' me LocationTable ,
8882}
8983
9084struct DropData < ' tcx > {
@@ -405,7 +399,6 @@ impl LivenessContext<'_, '_, '_, 'tcx> {
405399 & mut self . typeck ,
406400 value,
407401 live_at,
408- self . location_table ,
409402 )
410403 }
411404
@@ -462,7 +455,6 @@ impl LivenessContext<'_, '_, '_, 'tcx> {
462455 & mut self . typeck ,
463456 kind,
464457 live_at,
465- self . location_table ,
466458 ) ;
467459
468460 polonius:: add_var_drops_regions ( & mut self . typeck , dropped_local, & kind) ;
@@ -474,7 +466,6 @@ impl LivenessContext<'_, '_, '_, 'tcx> {
474466 typeck : & mut TypeChecker < ' _ , ' tcx > ,
475467 value : impl TypeFoldable < ' tcx > ,
476468 live_at : & HybridBitSet < PointIndex > ,
477- location_table : & LocationTable ,
478469 ) {
479470 debug ! ( "make_all_regions_live(value={:?})" , value) ;
480471 debug ! (
@@ -491,15 +482,6 @@ impl LivenessContext<'_, '_, '_, 'tcx> {
491482 . constraints
492483 . liveness_constraints
493484 . add_elements ( live_region_vid, live_at) ;
494-
495- // FIXME: remove this when we can generate our own region-live-at reliably
496- if let Some ( facts) = typeck. borrowck_context . all_facts {
497- for point in live_at. iter ( ) {
498- let loc = elements. to_location ( point) ;
499- facts. region_live_at . push ( ( live_region_vid, location_table. start_index ( loc) ) ) ;
500- facts. region_live_at . push ( ( live_region_vid, location_table. mid_index ( loc) ) ) ;
501- }
502- }
503485 } ) ;
504486 }
505487
0 commit comments