Skip to content

Commit 4d04916

Browse files
committed
restrict to coroutines again for perf
1 parent 26833b6 commit 4d04916

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

compiler/rustc_mir_transform/src/remove_dead_drops.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ impl<'tcx> crate::MirPass<'tcx> for RemoveDeadDrops {
1414
}
1515

1616
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
17+
if body.coroutine.is_none() {
18+
return;
19+
}
20+
1721
let move_data = MoveData::gather_moves(body, tcx, |_| true);
1822

1923
let mut maybe_init_cursor = MaybeInitializedPlaces::new(tcx, body, &move_data)

0 commit comments

Comments
 (0)