pub fn borrow_ref_struct_field(
        self,
        field_num: usize,
        is_mut: bool,
        local_idx: TempIndex,
    ) -> TypedValue {
        if cfg!(debug_assertions) {
            let (self_is_mut, _) = self.ty.get_ref_type();
            assert!(self_is_mut || !is_mut);
        }
        let field = self.ty.into_ref_struct_inst(None).fields.remove(field_num);
        let val = match self.val {
            BaseValue::Struct(mut v) => v.remove(field_num),
            _ => unreachable!(),
        };
        TypedValue {
            ty: Type::Reference(is_mut, field.ty),
            val,
            ptr: Pointer::RefField(local_idx, field_num),
        }
    }
/// Borrow one specific field from a struct reference
Borrow one specific field from a struct reference
Borrow one specific field from a struct reference
pub fn borrow_ref_struct_field(
        self,
        field_num: usize,
        is_mut: bool,
        local_idx: TempIndex,
    ) -> TypedValue {
        if cfg!(debug_assertions) {
            let (self_is_mut, _) = self.ty.get_ref_type();
            assert!(self_is_mut || !is_mut);
        }
        let field = self.ty.into_ref_struct_inst(None).fields.remove(field_num);
        let val = match self.val {
            BaseValue::Struct(mut v) => v.remove(field_num),
            _ => unreachable!(),
        };
        TypedValue {
            ty: Type::Reference(is_mut, field.ty),
            val,
            ptr: Pointer::RefField(local_idx, field_num),
        }
    }
pub fn borrow_ref_struct_field ( self , field_num : usize , is_mut : bool , local_idx : TempIndex , ) -> TypedValue { if cfg ! ( debug_assertions ) { let ( self_is_mut , _ ) = self . ty . get_ref_type ( ) ; assert ! ( self_is_mut is_mut ) ; } let field = self . ty . into_ref_struct_inst ( None ) . fields . remove ( field_num ) ; let val = match self . val { BaseValue :: Struct ( mut v ) => v . remove ( field_num ) , _ => unreachable ! ( ) , } ; TypedValue { ty : Type :: Reference ( is_mut , field . ty ) , val , ptr : Pointer :: RefField ( local_idx , field_num ) , } }
Borrow one specific field from a struct reference
Borrow one specific field from a struct reference
self
field_num
usize
is_mut
bool
local_idx
TempIndex