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
) ;
@@ -924,7 +924,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
924
924
}
925
925
926
926
fn drop_flags_on_init ( & mut self ) {
927
- let loc = Location { block : START_BLOCK , index : 0 } ;
927
+ let loc = Location { block : START_BLOCK , statement_index : 0 } ;
928
928
let span = self . patch . source_info_for_location ( self . mir , loc) . span ;
929
929
let false_ = self . constant_bool ( span, false ) ;
930
930
for flag in self . drop_flags . values ( ) {
@@ -939,7 +939,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
939
939
} = data. terminator ( ) . kind {
940
940
assert ! ( !self . patch. is_patched( bb) ) ;
941
941
942
- let loc = Location { block : tgt, index : 0 } ;
942
+ let loc = Location { block : tgt, statement_index : 0 } ;
943
943
let path = self . move_data ( ) . rev_lookup . find ( lv) ;
944
944
on_all_children_bits (
945
945
self . tcx , self . mir , self . move_data ( ) , path,
@@ -950,7 +950,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
950
950
}
951
951
952
952
fn drop_flags_for_args ( & mut self ) {
953
- let loc = Location { block : START_BLOCK , index : 0 } ;
953
+ let loc = Location { block : START_BLOCK , statement_index : 0 } ;
954
954
super :: drop_flag_effects_for_function_entry (
955
955
self . tcx , self . mir , self . env , |path, ds| {
956
956
self . set_drop_flag ( loc, path, ds) ;
@@ -990,7 +990,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
990
990
}
991
991
}
992
992
}
993
- let loc = Location { block : bb, index : i } ;
993
+ let loc = Location { block : bb, statement_index : i } ;
994
994
super :: drop_flag_effects_for_location (
995
995
self . tcx , self . mir , self . env , loc, |path, ds| {
996
996
if ds == DropFlagState :: Absent || allow_initializations {
@@ -1008,7 +1008,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
1008
1008
} = data. terminator ( ) . kind {
1009
1009
assert ! ( !self . patch. is_patched( bb) ) ;
1010
1010
1011
- let loc = Location { block : bb, index : data. statements . len ( ) } ;
1011
+ let loc = Location { block : bb, statement_index : data. statements . len ( ) } ;
1012
1012
let path = self . move_data ( ) . rev_lookup . find ( lv) ;
1013
1013
on_all_children_bits (
1014
1014
self . tcx , self . mir , self . move_data ( ) , path,
0 commit comments