@@ -103,7 +103,7 @@ fn find_dead_unwinds<'tcx>(
103103
104104 debug ! ( "find_dead_unwinds @ {:?}: path({:?})={:?}" , bb, location, path) ;
105105
106- flow_inits. seek_after ( body. terminator_loc ( bb) ) ;
106+ flow_inits. seek_before ( body. terminator_loc ( bb) ) ;
107107 let mut maybe_live = false ;
108108 on_all_drop_children_bits ( tcx, body, & env, path, |child| {
109109 maybe_live |= flow_inits. contains ( child) ;
@@ -124,9 +124,9 @@ struct InitializationData<'mir, 'tcx> {
124124}
125125
126126impl 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) ;
130130 }
131131
132132 fn state ( & self , path : MovePathIndex ) -> ( bool , bool ) {
@@ -294,7 +294,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
294294 _ => continue ,
295295 } ;
296296
297- self . init_data . seek_after ( self . body . terminator_loc ( bb) ) ;
297+ self . init_data . seek_before ( self . body . terminator_loc ( bb) ) ;
298298
299299 let path = self . move_data ( ) . rev_lookup . find ( location. as_ref ( ) ) ;
300300 debug ! ( "collect_drop_flags: {:?}, place {:?} ({:?})" , bb, location, path) ;
@@ -341,7 +341,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
341341 let resume_block = self . patch . resume_block ( ) ;
342342 match terminator. kind {
343343 TerminatorKind :: Drop { ref location, target, unwind } => {
344- self . init_data . seek_after ( loc) ;
344+ self . init_data . seek_before ( loc) ;
345345 match self . move_data ( ) . rev_lookup . find ( location. as_ref ( ) ) {
346346 LookupResult :: Exact ( path) => elaborate_drop (
347347 & mut Elaborator { ctxt : self } ,
@@ -424,7 +424,7 @@ impl<'b, 'tcx> ElaborateDropsCtxt<'b, 'tcx> {
424424 match self . move_data ( ) . rev_lookup . find ( location. as_ref ( ) ) {
425425 LookupResult :: Exact ( path) => {
426426 debug ! ( "elaborate_drop_and_replace({:?}) - tracked {:?}" , terminator, path) ;
427- self . init_data . seek_after ( loc) ;
427+ self . init_data . seek_before ( loc) ;
428428 elaborate_drop (
429429 & mut Elaborator { ctxt : self } ,
430430 terminator. source_info ,
0 commit comments