fn get_switched_on_type<'tcx>(
    block_data: &BasicBlockData<'tcx>,
    tcx: TyCtxt<'tcx>,
    body: &Body<'tcx>
) -> Option<Ty<'tcx>>
Expand description

If the basic block terminates by switching on a discriminant, this returns the Ty the discriminant is read from. Otherwise, returns None.