@@ -14,7 +14,7 @@ struct UseFactsExtractor<'me, 'tcx> {
14
14
var_defined_at : & ' me mut VarPointRelation ,
15
15
var_used_at : & ' me mut VarPointRelation ,
16
16
location_table : & ' me LocationTable ,
17
- var_dropped_at : & ' me mut VarPointRelation ,
17
+ var_dropped_at : & ' me mut Vec < ( Local , Location ) > ,
18
18
move_data : & ' me MoveData < ' tcx > ,
19
19
path_accessed_at_base : & ' me mut PathPointRelation ,
20
20
}
@@ -37,7 +37,7 @@ impl<'tcx> UseFactsExtractor<'_, 'tcx> {
37
37
38
38
fn insert_drop_use ( & mut self , local : Local , location : Location ) {
39
39
debug ! ( "UseFactsExtractor::insert_drop_use()" ) ;
40
- self . var_dropped_at . push ( ( local, self . location_to_index ( location) ) ) ;
40
+ self . var_dropped_at . push ( ( local, location) ) ;
41
41
}
42
42
43
43
fn insert_path_access ( & mut self , path : MovePathIndex , location : Location ) {
@@ -87,8 +87,12 @@ pub(super) fn populate_access_facts<'a, 'tcx>(
87
87
body : & Body < ' tcx > ,
88
88
location_table : & LocationTable ,
89
89
move_data : & MoveData < ' tcx > ,
90
- //FIXME: this is not mutated, but expected to be modified as
91
- // out param, bug?
90
+ // FIXME: this is an inelegant way of squirreling away a
91
+ // copy of `var_dropped_at` in the original `Location` format
92
+ // for later use in `trace::trace()`, which updates some liveness-
93
+ // internal data based on what Polonius saw.
94
+ // Ideally, that part would access the Polonius facts directly, and this
95
+ // would be regular facts gathering.
92
96
dropped_at : & mut Vec < ( Local , Location ) > ,
93
97
) {
94
98
debug ! ( "populate_access_facts()" ) ;
@@ -97,7 +101,7 @@ pub(super) fn populate_access_facts<'a, 'tcx>(
97
101
let mut extractor = UseFactsExtractor {
98
102
var_defined_at : & mut facts. var_defined_at ,
99
103
var_used_at : & mut facts. var_used_at ,
100
- var_dropped_at : & mut facts . var_dropped_at ,
104
+ var_dropped_at : dropped_at ,
101
105
path_accessed_at_base : & mut facts. path_accessed_at_base ,
102
106
location_table,
103
107
move_data,
0 commit comments