Struct rustc_const_eval::interpret::OpTy [−][src]
pub struct OpTy<'tcx, Tag: Provenance = AllocId> {
op: Operand<Tag>,
pub layout: TyAndLayout<'tcx>,
}
Fields
op: Operand<Tag>
layout: TyAndLayout<'tcx>
Implementations
Note: do not call as_ref
on the resulting place. This function should only be used to
read from the resulting mplace, not to get its address back.
Note: do not call as_ref
on the resulting place. This function should only be used to
read from the resulting mplace, not to get its address back.
Trait Implementations
impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for OpTy<'tcx, M::PointerTag>
impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for OpTy<'tcx, M::PointerTag>
Gets this value’s layout.
fn to_op(
&self,
_ecx: &InterpCx<'mir, 'tcx, M>
) -> InterpResult<'tcx, OpTy<'tcx, M::PointerTag>>
fn to_op(
&self,
_ecx: &InterpCx<'mir, 'tcx, M>
) -> InterpResult<'tcx, OpTy<'tcx, M::PointerTag>>
Makes this into an OpTy
.
Creates this from an MPlaceTy
.
fn project_downcast(
&self,
ecx: &InterpCx<'mir, 'tcx, M>,
variant: VariantIdx
) -> InterpResult<'tcx, Self>
fn project_downcast(
&self,
ecx: &InterpCx<'mir, 'tcx, M>,
variant: VariantIdx
) -> InterpResult<'tcx, Self>
Projects to the given enum variant.
fn project_field(
&self,
ecx: &InterpCx<'mir, 'tcx, M>,
field: usize
) -> InterpResult<'tcx, Self>
fn project_field(
&self,
ecx: &InterpCx<'mir, 'tcx, M>,
field: usize
) -> InterpResult<'tcx, Self>
Projects to the n-th field.
Auto Trait Implementations
impl<'tcx, Tag = AllocId> !RefUnwindSafe for OpTy<'tcx, Tag>
impl<'tcx, Tag = AllocId> !UnwindSafe for OpTy<'tcx, Tag>
Blanket Implementations
Mutably borrows from an owned value. Read more
Layout
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.