Function rustc_mir_transform::coroutine::insert_switch

source ·
fn insert_switch<'tcx>(
    body: &mut Body<'tcx>,
    cases: Vec<(usize, BasicBlock)>,
    transform: &TransformVisitor<'tcx>,
    default: TerminatorKind<'tcx>
)
Expand description

Replaces the entry point of body with a block that switches on the coroutine discriminant and dispatches to blocks according to cases.

After this function, the former entry point of the function will be bb1.