[][src]Struct rustc_mir::interpret::Pointer

pub struct Pointer<Tag = ()> {
    pub alloc_id: AllocId,
    pub offset: Size,
    pub tag: Tag,
}
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Represents a pointer in the Miri engine.

Pointer is generic over the Tag associated with each pointer, which is used to do provenance tracking during execution.

Fields

alloc_id: AllocId
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

offset: Size
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

tag: Tag
⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Implementations

impl Pointer<()>[src]

pub fn new(alloc_id: AllocId, offset: Size) -> Pointer<()>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn with_tag<Tag>(self, tag: Tag) -> Pointer<Tag>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<'tcx, Tag> Pointer<Tag>[src]

pub fn new_with_tag(alloc_id: AllocId, offset: Size, tag: Tag) -> Pointer<Tag>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn offset(
    self,
    i: Size,
    cx: &impl HasDataLayout
) -> Result<Pointer<Tag>, InterpErrorInfo<'tcx>>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn overflowing_offset(
    self,
    i: Size,
    cx: &impl HasDataLayout
) -> (Pointer<Tag>, bool)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn wrapping_offset(self, i: Size, cx: &impl HasDataLayout) -> Pointer<Tag>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn signed_offset(
    self,
    i: i64,
    cx: &impl HasDataLayout
) -> Result<Pointer<Tag>, InterpErrorInfo<'tcx>>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn overflowing_signed_offset(
    self,
    i: i64,
    cx: &impl HasDataLayout
) -> (Pointer<Tag>, bool)
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn wrapping_signed_offset(
    self,
    i: i64,
    cx: &impl HasDataLayout
) -> Pointer<Tag>
[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

pub fn erase_tag(self) -> Pointer<()>[src]

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Trait Implementations

impl<Tag> Clone for Pointer<Tag> where
    Tag: Clone
[src]

impl<Tag> Copy for Pointer<Tag> where
    Tag: Copy
[src]

impl<Tag> Debug for Pointer<Tag> where
    Tag: Debug
[src]

impl Debug for Pointer<()>[src]

impl<Tag> Decodable for Pointer<Tag> where
    Tag: Decodable
[src]

impl<Tag> Display for Pointer<Tag> where
    Tag: Debug
[src]

impl<Tag> Encodable for Pointer<Tag> where
    Tag: Encodable
[src]

impl<Tag> Eq for Pointer<Tag> where
    Tag: Eq
[src]

impl From<AllocId> for Pointer<()>[src]

Produces a Pointer that points to the beginning of the Allocation.

impl<Tag> From<Pointer<Tag>> for Scalar<Tag>[src]

impl<Tag> From<Pointer<Tag>> for ScalarMaybeUninit<Tag>[src]

impl<Tag> From<Pointer<Tag>> for Immediate<Tag>[src]

impl<Tag> Hash for Pointer<Tag> where
    Tag: Hash
[src]

impl<'__ctx, Tag> HashStable<StableHashingContext<'__ctx>> for Pointer<Tag> where
    Tag: HashStable<StableHashingContext<'__ctx>>, 
[src]

impl<Tag> Ord for Pointer<Tag> where
    Tag: Ord
[src]

impl<Tag> PartialEq<Pointer<Tag>> for Pointer<Tag> where
    Tag: PartialEq<Tag>, 
[src]

impl<Tag> PartialOrd<Pointer<Tag>> for Pointer<Tag> where
    Tag: PartialOrd<Tag>, 
[src]

impl<Tag> StructuralEq for Pointer<Tag>[src]

impl<Tag> StructuralPartialEq for Pointer<Tag>[src]

Auto Trait Implementations

impl<Tag> RefUnwindSafe for Pointer<Tag> where
    Tag: RefUnwindSafe

impl<Tag> Send for Pointer<Tag> where
    Tag: Send

impl<Tag> Sync for Pointer<Tag> where
    Tag: Sync

impl<Tag> Unpin for Pointer<Tag> where
    Tag: Unpin

impl<Tag> UnwindSafe for Pointer<Tag> where
    Tag: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<'tcx, T> ArenaAllocatable<'tcx, ()> for T where
    T: Copy
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<'a, T> Captures<'a> for T where
    T: ?Sized
[src]

impl<T> Cast for T

impl<T> Decodable for T where
    T: UseSpecializedDecodable
[src]

impl<Ctxt, T> DepNodeParams<Ctxt> for T where
    Ctxt: DepContext,
    T: HashStable<<Ctxt as DepContext>::StableHashingContext> + Debug
[src]

impl<T> Encodable for T where
    T: UseSpecializedEncodable + ?Sized
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> Erased for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoSelfProfilingString for T where
    T: Debug
[src]

impl<T> IntoSelfProfilingString for T where
    T: SpecIntoSelfProfilingString
[src]

impl<T> MaybeResult<T> for T[src]

type Error = !

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

impl<T> Same<T> for T

type Output = T

⚙️ This is an internal compiler API. (rustc_private)

This crate is being loaded from the sysroot, a permanently unstable location for private compiler dependencies. It is not intended for general use. Prefer using a public version of this crate from crates.io via Cargo.toml.

Should always be Self

impl<E> SpecializationError for E[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> WithConstness for T[src]