@@ -134,7 +134,7 @@ impl LivenessResults<'me, 'typeck, 'flow, 'tcx> {
134
134
135
135
// FIXME: this is temporary until we can generate our own initialization
136
136
if self . cx . typeck . borrowck_context . all_facts . is_some ( ) {
137
- self . add_polonius_var_initialized_on_exit_for ( local)
137
+ self . add_polonius_var_maybe_initialized_on_exit_for ( local)
138
138
}
139
139
140
140
self . compute_use_live_points_for ( local) ;
@@ -161,14 +161,14 @@ impl LivenessResults<'me, 'typeck, 'flow, 'tcx> {
161
161
//
162
162
// FIXME: this analysis (the initialization tracking) should be
163
163
// done in Polonius, but isn't yet.
164
- fn add_polonius_var_initialized_on_exit_for ( & mut self , local : Local ) {
164
+ fn add_polonius_var_maybe_initialized_on_exit_for ( & mut self , local : Local ) {
165
165
let move_path = self . cx . move_data . rev_lookup . find_local ( local) ;
166
166
let facts = self . cx . typeck . borrowck_context . all_facts . as_mut ( ) . unwrap ( ) ;
167
167
for block in self . cx . body . basic_blocks ( ) . indices ( ) {
168
168
debug ! ( "polonius: generating initialization facts for {:?} in {:?}" , local, block) ;
169
169
170
170
// iterate through the block, applying the effects of each statement
171
- // up to and including location, and populate `var_initialized_on_exit `
171
+ // up to and including location, and populate `var_maybe_initialized_on_exit `
172
172
self . cx . flow_inits . reset_to_entry_of ( block) ;
173
173
let start_location = Location { block, statement_index : 0 } ;
174
174
self . cx . flow_inits . apply_local_effect ( start_location) ;
@@ -181,7 +181,7 @@ impl LivenessResults<'me, 'typeck, 'flow, 'tcx> {
181
181
// statement has not yet taken effect:
182
182
if self . cx . flow_inits . has_any_child_of ( move_path) . is_some ( ) {
183
183
facts
184
- . var_initialized_on_exit
184
+ . var_maybe_initialized_on_exit
185
185
. push ( ( local, self . cx . location_table . start_index ( current_location) ) ) ;
186
186
}
187
187
@@ -190,7 +190,7 @@ impl LivenessResults<'me, 'typeck, 'flow, 'tcx> {
190
190
191
191
if self . cx . flow_inits . has_any_child_of ( move_path) . is_some ( ) {
192
192
facts
193
- . var_initialized_on_exit
193
+ . var_maybe_initialized_on_exit
194
194
. push ( ( local, self . cx . location_table . mid_index ( current_location) ) ) ;
195
195
}
196
196
}
@@ -199,7 +199,7 @@ impl LivenessResults<'me, 'typeck, 'flow, 'tcx> {
199
199
200
200
if self . cx . flow_inits . has_any_child_of ( move_path) . is_some ( ) {
201
201
facts
202
- . var_initialized_on_exit
202
+ . var_maybe_initialized_on_exit
203
203
. push ( ( local, self . cx . location_table . start_index ( terminator_location) ) ) ;
204
204
}
205
205
@@ -208,7 +208,7 @@ impl LivenessResults<'me, 'typeck, 'flow, 'tcx> {
208
208
209
209
if self . cx . flow_inits . has_any_child_of ( move_path) . is_some ( ) {
210
210
facts
211
- . var_initialized_on_exit
211
+ . var_maybe_initialized_on_exit
212
212
. push ( ( local, self . cx . location_table . mid_index ( terminator_location) ) ) ;
213
213
}
214
214
}
0 commit comments