Skip to content

Commit 3ccb567

Browse files
committed
Add TerminatorKind::DropAndReplace handling
1 parent e48691a commit 3ccb567

File tree

1 file changed

+13
-0
lines changed
  • src/librustc_mir/dataflow/impls

1 file changed

+13
-0
lines changed

src/librustc_mir/dataflow/impls/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,19 @@ impl<'a, 'gcx, 'tcx> BitDenotation for MovingOutStatements<'a, 'gcx, 'tcx> {
517517
assert!(move_index.index() < bits_per_block);
518518
zero_to_one(sets.gen_set.words_mut(), *move_index);
519519
}
520+
match term.kind {
521+
mir::TerminatorKind::DropAndReplace { ref location, .. } => {
522+
on_lookup_result_bits(self.tcx,
523+
mir,
524+
move_data,
525+
move_data.rev_lookup.find(location),
526+
|mpi| for moi in &move_data.path_map[mpi] {
527+
assert!(moi.index() < bits_per_block);
528+
sets.kill_set.add(&moi);
529+
});
530+
}
531+
_ => {}
532+
}
520533
}
521534

522535
fn propagate_call_return(&self,

0 commit comments

Comments
 (0)