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 generator discriminant and dispatches to blocks according to cases.

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