Struct rustc_const_eval::interpret::place::MPlaceTy [−][src]
pub struct MPlaceTy<'tcx, Tag: Provenance = AllocId> {
mplace: MemPlace<Tag>,
pub layout: TyAndLayout<'tcx>,
}
Expand description
A MemPlace with its layout. Constructing it is only possible in this module.
Fields
mplace: MemPlace<Tag>
layout: TyAndLayout<'tcx>
Implementations
Produces a MemPlace that works for ZST but nothing else
pub fn offset(
&self,
offset: Size,
meta: MemPlaceMeta<Tag>,
layout: TyAndLayout<'tcx>,
cx: &impl HasDataLayout
) -> InterpResult<'tcx, Self>
Methods from Deref<Target = MemPlace<Tag>>
Trait Implementations
impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for MPlaceTy<'tcx, M::PointerTag>
impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> Value<'mir, 'tcx, M> for MPlaceTy<'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 MPlaceTy<'tcx, Tag>
impl<'tcx, Tag = AllocId> !UnwindSafe for MPlaceTy<'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.