[][src]Trait rustc_mir::interpret::PointerArithmetic

pub trait PointerArithmetic: HasDataLayout {
    fn pointer_size(&self) -> Size { ... }
fn machine_usize_max(&self) -> u64 { ... }
fn machine_isize_min(&self) -> i64 { ... }
fn machine_isize_max(&self) -> i64 { ... }
fn truncate_to_ptr(&self, (u64, bool)) -> (u64, bool) { ... }
fn overflowing_offset(&self, val: u64, i: u64) -> (u64, bool) { ... }
fn overflowing_signed_offset(&self, val: u64, i: i64) -> (u64, bool) { ... }
fn offset<'tcx>(
        &self,
        val: u64,
        i: u64
    ) -> Result<u64, InterpErrorInfo<'tcx>> { ... }
fn signed_offset<'tcx>(
        &self,
        val: u64,
        i: i64
    ) -> Result<u64, InterpErrorInfo<'tcx>> { ... } }
⚙️ 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.

Provided methods

fn pointer_size(&self) -> 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.

fn machine_usize_max(&self) -> u64

⚙️ 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.

fn machine_isize_min(&self) -> i64

⚙️ 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.

fn machine_isize_max(&self) -> i64

⚙️ 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.

fn truncate_to_ptr(&self, (u64, bool)) -> (u64, bool)

⚙️ 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.

Helper function: truncate given value-"overflowed flag" pair to pointer size and update "overflowed flag" if there was an overflow. This should be called by all the other methods before returning!

fn overflowing_offset(&self, val: u64, i: u64) -> (u64, bool)

⚙️ 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.

fn overflowing_signed_offset(&self, val: u64, i: i64) -> (u64, bool)

⚙️ 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.

fn offset<'tcx>(&self, val: u64, i: u64) -> Result<u64, InterpErrorInfo<'tcx>>

⚙️ 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.

fn signed_offset<'tcx>(
    &self,
    val: u64,
    i: i64
) -> Result<u64, InterpErrorInfo<'tcx>>

⚙️ 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.

Loading content...

Implementors

impl<T> PointerArithmetic for T where
    T: HasDataLayout
[src]

Loading content...