Struct rustc_const_eval::interpret::place::MemPlace [−][src]
pub struct MemPlace<Tag: Provenance = AllocId> {
pub ptr: Pointer<Option<Tag>>,
pub align: Align,
pub meta: MemPlaceMeta<Tag>,
}
Fields
ptr: Pointer<Option<Tag>>
The pointer can be a pure integer, with the None
tag.
align: Align
meta: MemPlaceMeta<Tag>
Metadata for unsized places. Interpretation is up to the type.
Must not be present for sized types, but can be missing for unsized types
(e.g., extern type
).
Implementations
Adjust the provenance of the main pointer (metadata is unaffected).
Turn a mplace into a (thin or wide) pointer, as a reference, pointing to the same space.
This is the inverse of ref_to_mplace
.
pub fn offset<'tcx>(
self,
offset: Size,
meta: MemPlaceMeta<Tag>,
cx: &impl HasDataLayout
) -> InterpResult<'tcx, Self>
Trait Implementations
impl<'__ctx, Tag: Provenance> HashStable<StableHashingContext<'__ctx>> for MemPlace<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>,
impl<'__ctx, Tag: Provenance> HashStable<StableHashingContext<'__ctx>> for MemPlace<Tag> where
Tag: HashStable<StableHashingContext<'__ctx>>,
Auto Trait Implementations
impl<Tag> RefUnwindSafe for MemPlace<Tag> where
Tag: RefUnwindSafe,
impl<Tag> UnwindSafe for MemPlace<Tag> where
Tag: UnwindSafe,
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.