We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 06e4768 commit 4004bf1Copy full SHA for 4004bf1
src/librustc_mir/transform/generator.rs
@@ -1222,7 +1222,11 @@ impl<'tcx> MirPass<'tcx> for StateTransform {
1222
movability == hir::Movability::Movable,
1223
)
1224
}
1225
- _ => bug!(),
+ _ => {
1226
+ tcx.sess
1227
+ .delay_span_bug(body.span, &format!("unexpected generator type {}", gen_ty));
1228
+ return;
1229
+ }
1230
};
1231
1232
// Compute GeneratorState<yield_ty, return_ty>
0 commit comments