pub fn trans_switch<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                                r: &Repr<'tcx>,
                                scrutinee: ValueRef,
                                range_assert: bool)
                                -> (BranchKind, Option<ValueRef>) {
    match *r {
        CEnum(..) | General(..) |
        RawNullablePointer { .. } | StructWrappedNullablePointer { .. } => {
            (BranchKind::Switch, Some(trans_get_discr(bcx, r, scrutinee, None, range_assert)))
        }
        Univariant(..) | UntaggedUnion(..) => {
            // N.B.: Univariant means <= 1 enum variants (*not* == 1 variants).
            (BranchKind::Single, None)
        }
    }
}
/// Obtain a representation of the discriminant sufficient to translate
/// destructuring; this may or may not involve the actual discriminant.
Obtain a representation of the discriminant sufficient to translate
destructuring; this may or may not involve the actual discriminant.
Obtain a representation of the discriminant sufficient to translate destructuring ; this may or may not involve the actual discriminant .
pub fn trans_switch<'blk, 'tcx>(bcx: Block<'blk, 'tcx>,
                                r: &Repr<'tcx>,
                                scrutinee: ValueRef,
                                range_assert: bool)
                                -> (BranchKind, Option<ValueRef>) {
    match *r {
        CEnum(..) | General(..) |
        RawNullablePointer { .. } | StructWrappedNullablePointer { .. } => {
            (BranchKind::Switch, Some(trans_get_discr(bcx, r, scrutinee, None, range_assert)))
        }
        Univariant(..) | UntaggedUnion(..) => {
            // N.B.: Univariant means <= 1 enum variants (*not* == 1 variants).
            (BranchKind::Single, None)
        }
    }
}
pub fn trans_switch < ' blk , ' tcx > ( bcx : Block < ' blk , ' tcx > , r : & Repr < ' tcx > , scrutinee : ValueRef , range_assert : bool ) -> ( BranchKind , Option < ValueRef > ) { match * r { CEnum ( .. ) | General ( .. ) | RawNullablePointer { .. } | StructWrappedNullablePointer { .. } => { ( BranchKind :: Switch , Some ( trans_get_discr ( bcx , r , scrutinee , None , range_assert ) ) ) } Univariant ( .. ) | UntaggedUnion ( .. ) => { // N.B.: Univariant means <= 1 enum variants (*not* == 1 variants). ( BranchKind :: Single , None ) } } }
Obtain a representation of the discriminant sufficient to translate
destructuring; this may or may not involve the actual discriminant.
Obtain a representation of the discriminant sufficient to translate destructuring ; this may or may not involve the actual discriminant .
bcx
Block<'blk, 'tcx>
r
&Repr<'tcx>
scrutinee
ValueRef
range_assert
bool
bcx
Block<'blk, 'tcx>
r
&Repr<'tcx>
scrutinee
ValueRef
range_assert
bool