@@ -103,7 +103,7 @@ fn find_dead_unwinds<'tcx>(
103
103
104
104
debug ! ( "find_dead_unwinds @ {:?}: path({:?})={:?}" , bb, location, path) ;
105
105
106
- flow_inits. seek_after ( body. terminator_loc ( bb) ) ;
106
+ flow_inits. seek_before ( body. terminator_loc ( bb) ) ;
107
107
let mut maybe_live = false ;
108
108
on_all_drop_children_bits ( tcx, body, & env, path, |child| {
109
109
maybe_live |= flow_inits. contains ( child) ;
@@ -124,9 +124,9 @@ struct InitializationData<'mir, 'tcx> {
124
124
}
125
125
126
126
impl InitializationData < ' _ , ' _ > {
127
- fn seek_after ( & mut self , loc : Location ) {
128
- self . inits . seek_after ( loc) ;
129
- self . uninits . seek_after ( loc) ;
127
+ fn seek_before ( & mut self , loc : Location ) {
128
+ self . inits . seek_before ( loc) ;
129
+ self . uninits . seek_before ( loc) ;
130
130
}
131
131
132
132
fn state ( & self , path : MovePathIndex ) -> ( bool , bool ) {
@@ -294,7 +294,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
294
294
_ => continue ,
295
295
} ;
296
296
297
- self . init_data . seek_after ( self . body . terminator_loc ( bb) ) ;
297
+ self . init_data . seek_before ( self . body . terminator_loc ( bb) ) ;
298
298
299
299
let path = self . move_data ( ) . rev_lookup . find ( location. as_ref ( ) ) ;
300
300
debug ! ( "collect_drop_flags: {:?}, place {:?} ({:?})" , bb, location, path) ;
@@ -341,7 +341,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
341
341
let resume_block = self . patch . resume_block ( ) ;
342
342
match terminator. kind {
343
343
TerminatorKind :: Drop { ref location, target, unwind } => {
344
- self . init_data . seek_after ( loc) ;
344
+ self . init_data . seek_before ( loc) ;
345
345
match self . move_data ( ) . rev_lookup . find ( location. as_ref ( ) ) {
346
346
LookupResult :: Exact ( path) => elaborate_drop (
347
347
& mut Elaborator { ctxt : self } ,
@@ -424,7 +424,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
424
424
match self . move_data ( ) . rev_lookup . find ( location. as_ref ( ) ) {
425
425
LookupResult :: Exact ( path) => {
426
426
debug ! ( "elaborate_drop_and_replace({:?}) - tracked {:?}" , terminator, path) ;
427
- self . init_data . seek_after ( loc) ;
427
+ self . init_data . seek_before ( loc) ;
428
428
elaborate_drop (
429
429
& mut Elaborator { ctxt : self } ,
430
430
terminator. source_info ,
0 commit comments