pub struct PlaceTy<'tcx, Tag: Provenance = AllocId> {
place: Place<Tag>,
pub layout: TyAndLayout<'tcx>,
pub align: Align,
}Fields
place: Place<Tag>layout: TyAndLayout<'tcx>align: Alignrustc does not have a proper way to represent the type of a field of a repr(packed) struct:
it needs to have a different alignment than the field type would usually have.
So we represent this here with a separate field that “overwrites” layout.align.
This means layout.align should never be used for a PlaceTy!
Implementations
sourceimpl<'tcx, Tag: Provenance> PlaceTy<'tcx, Tag>
impl<'tcx, Tag: Provenance> PlaceTy<'tcx, Tag>
sourcepub fn try_as_mplace(&self) -> Result<MPlaceTy<'tcx, Tag>, (usize, Local)>
pub fn try_as_mplace(&self) -> Result<MPlaceTy<'tcx, Tag>, (usize, Local)>
A place is either an mplace or some local.
pub fn assert_mem_place(&self) -> MPlaceTy<'tcx, Tag>
Methods from Deref<Target = Place<Tag>>
sourcepub fn assert_local(&self) -> (usize, Local)
pub fn assert_local(&self) -> (usize, Local)
Asserts that this points to some local variable. Returns the frame idx and the variable idx.
Trait Implementations
sourceimpl<'tcx, Tag: Clone + Provenance> Clone for PlaceTy<'tcx, Tag>
impl<'tcx, Tag: Clone + Provenance> Clone for PlaceTy<'tcx, Tag>
sourceimpl<'tcx, Tag: Debug + Provenance> Debug for PlaceTy<'tcx, Tag>
impl<'tcx, Tag: Debug + Provenance> Debug for PlaceTy<'tcx, Tag>
sourceimpl<'tcx, Tag: Provenance> Deref for PlaceTy<'tcx, Tag>
impl<'tcx, Tag: Provenance> Deref for PlaceTy<'tcx, Tag>
sourceimpl<'tcx, Tag: Provenance> From<&MPlaceTy<'tcx, Tag>> for PlaceTy<'tcx, Tag>
impl<'tcx, Tag: Provenance> From<&MPlaceTy<'tcx, Tag>> for PlaceTy<'tcx, Tag>
sourceimpl<'tcx, Tag: Provenance> From<&mut MPlaceTy<'tcx, Tag>> for PlaceTy<'tcx, Tag>
impl<'tcx, Tag: Provenance> From<&mut MPlaceTy<'tcx, Tag>> for PlaceTy<'tcx, Tag>
sourceimpl<'tcx, Tag: Provenance> From<MPlaceTy<'tcx, Tag>> for PlaceTy<'tcx, Tag>
impl<'tcx, Tag: Provenance> From<MPlaceTy<'tcx, Tag>> for PlaceTy<'tcx, Tag>
impl<'tcx, Tag: Copy + Provenance> Copy for PlaceTy<'tcx, Tag>
Auto Trait Implementations
impl<'tcx, Tag = AllocId> !RefUnwindSafe for PlaceTy<'tcx, Tag>
impl<'tcx, Tag> Send for PlaceTy<'tcx, Tag> where
Tag: Send,
impl<'tcx, Tag> Sync for PlaceTy<'tcx, Tag> where
Tag: Sync,
impl<'tcx, Tag> Unpin for PlaceTy<'tcx, Tag> where
Tag: Unpin,
impl<'tcx, Tag = AllocId> !UnwindSafe for PlaceTy<'tcx, Tag>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
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.