Rollup merge of #73339 - jonas-schievink:unbug, r=estebank
Don't run generator transform when there's a TyErr Not sure if this might cause any problems later on, but we shouldn't be hitting codegen or const eval for the produced MIR anyways, so it should be fine. cc https://github.com/rust-lang/rust/issues/72685#issuecomment-643749020
This commit is contained in:
commit
5bbcdf5f53
@ -1222,7 +1222,11 @@ fn run_pass(&self, tcx: TyCtxt<'tcx>, source: MirSource<'tcx>, body: &mut Body<'
|
||||
movability == hir::Movability::Movable,
|
||||
)
|
||||
}
|
||||
_ => bug!(),
|
||||
_ => {
|
||||
tcx.sess
|
||||
.delay_span_bug(body.span, &format!("unexpected generator type {}", gen_ty));
|
||||
return;
|
||||
}
|
||||
};
|
||||
|
||||
// Compute GeneratorState<yield_ty, return_ty>
|
||||
|
Loading…
Reference in New Issue
Block a user