9
9
// except according to those terms.
10
10
11
11
use indexed_set:: IdxSetBuf ;
12
- use super :: gather_moves:: { MoveData , MovePathIndex , MovePathContent , Location } ;
12
+ use super :: gather_moves:: { MoveData , MovePathIndex , MovePathContent } ;
13
13
use super :: dataflow:: { MaybeInitializedLvals , MaybeUninitializedLvals } ;
14
14
use super :: dataflow:: { DataflowResults } ;
15
15
use super :: { drop_flag_effects_for_location, on_all_children_bits} ;
@@ -146,9 +146,9 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
146
146
dead : self . flow_uninits . sets ( ) . on_entry_set_for ( loc. block . index ( ) )
147
147
. to_owned ( ) ,
148
148
} ;
149
- for stmt in 0 ..loc. index {
149
+ for stmt in 0 ..loc. statement_index {
150
150
data. apply_location ( self . tcx , self . mir , self . env ,
151
- Location { block : loc. block , index : stmt } ) ;
151
+ Location { block : loc. block , statement_index : stmt } ) ;
152
152
}
153
153
data
154
154
}
@@ -226,7 +226,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
226
226
227
227
let init_data = self . initialization_data_at ( Location {
228
228
block : bb,
229
- index : data. statements . len ( )
229
+ statement_index : data. statements . len ( )
230
230
} ) ;
231
231
232
232
let path = self . move_data ( ) . rev_lookup . find ( location) ;
@@ -249,7 +249,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
249
249
fn elaborate_drops ( & mut self )
250
250
{
251
251
for ( bb, data) in self . mir . basic_blocks ( ) . iter_enumerated ( ) {
252
- let loc = Location { block : bb, index : data. statements . len ( ) } ;
252
+ let loc = Location { block : bb, statement_index : data. statements . len ( ) } ;
253
253
let terminator = data. terminator ( ) ;
254
254
255
255
let resume_block = self . patch . resume_block ( ) ;
@@ -359,9 +359,9 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
359
359
unwind : Some ( unwind)
360
360
} , bb) ;
361
361
on_all_children_bits ( self . tcx , self . mir , self . move_data ( ) , path, |child| {
362
- self . set_drop_flag ( Location { block : target, index : 0 } ,
362
+ self . set_drop_flag ( Location { block : target, statement_index : 0 } ,
363
363
child, DropFlagState :: Present ) ;
364
- self . set_drop_flag ( Location { block : unwind, index : 0 } ,
364
+ self . set_drop_flag ( Location { block : unwind, statement_index : 0 } ,
365
365
child, DropFlagState :: Present ) ;
366
366
} ) ;
367
367
}
@@ -741,7 +741,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
741
741
let drop_block = self . drop_block ( c) ;
742
742
if update_drop_flag {
743
743
self . set_drop_flag (
744
- Location { block : drop_block, index : 0 } ,
744
+ Location { block : drop_block, statement_index : 0 } ,
745
745
c. path ,
746
746
DropFlagState :: Absent
747
747
) ;
@@ -927,7 +927,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
927
927
}
928
928
929
929
fn drop_flags_on_init ( & mut self ) {
930
- let loc = Location { block : START_BLOCK , index : 0 } ;
930
+ let loc = Location { block : START_BLOCK , statement_index : 0 } ;
931
931
let span = self . patch . source_info_for_location ( self . mir , loc) . span ;
932
932
let false_ = self . constant_bool ( span, false ) ;
933
933
for flag in self . drop_flags . values ( ) {
@@ -942,7 +942,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
942
942
} = data. terminator ( ) . kind {
943
943
assert ! ( !self . patch. is_patched( bb) ) ;
944
944
945
- let loc = Location { block : tgt, index : 0 } ;
945
+ let loc = Location { block : tgt, statement_index : 0 } ;
946
946
let path = self . move_data ( ) . rev_lookup . find ( lv) ;
947
947
on_all_children_bits (
948
948
self . tcx , self . mir , self . move_data ( ) , path,
@@ -953,7 +953,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
953
953
}
954
954
955
955
fn drop_flags_for_args ( & mut self ) {
956
- let loc = Location { block : START_BLOCK , index : 0 } ;
956
+ let loc = Location { block : START_BLOCK , statement_index : 0 } ;
957
957
super :: drop_flag_effects_for_function_entry (
958
958
self . tcx , self . mir , self . env , |path, ds| {
959
959
self . set_drop_flag ( loc, path, ds) ;
@@ -993,7 +993,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
993
993
}
994
994
}
995
995
}
996
- let loc = Location { block : bb, index : i } ;
996
+ let loc = Location { block : bb, statement_index : i } ;
997
997
super :: drop_flag_effects_for_location (
998
998
self . tcx , self . mir , self . env , loc, |path, ds| {
999
999
if ds == DropFlagState :: Absent || allow_initializations {
@@ -1011,7 +1011,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
1011
1011
} = data. terminator ( ) . kind {
1012
1012
assert ! ( !self . patch. is_patched( bb) ) ;
1013
1013
1014
- let loc = Location { block : bb, index : data. statements . len ( ) } ;
1014
+ let loc = Location { block : bb, statement_index : data. statements . len ( ) } ;
1015
1015
let path = self . move_data ( ) . rev_lookup . find ( lv) ;
1016
1016
on_all_children_bits (
1017
1017
self . tcx , self . mir , self . move_data ( ) , path,
0 commit comments