Skip to content

Commit 8df88fa

Browse files
committed
Perform SROA inside coroutines.
1 parent 2452b2f commit 8df88fa

File tree

1 file changed

+0
-5
lines changed
  • compiler/rustc_mir_transform/src

1 file changed

+0
-5
lines changed

compiler/rustc_mir_transform/src/sroa.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ impl<'tcx> crate::MirPass<'tcx> for ScalarReplacementOfAggregates {
2323
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {
2424
debug!(def_id = ?body.source.def_id());
2525

26-
// Avoid query cycles (coroutines require optimized MIR for layout).
27-
if tcx.type_of(body.source.def_id()).instantiate_identity().is_coroutine() {
28-
return;
29-
}
30-
3126
let mut excluded = excluded_locals(body);
3227
let typing_env = body.typing_env(tcx);
3328
loop {

0 commit comments

Comments
 (0)