Struct rustc::mir::interpret::Pointer [−][src]
pub struct Pointer { pub primval: PrimVal, }
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
A wrapper type around PrimVal
that cannot be turned back into a PrimVal
accidentally.
This type clears up a few APIs where having a PrimVal
argument for something that is
potentially an integer pointer or a pointer to an allocation was unclear.
I (@oli-obk) believe it is less easy to mix up generic primvals and primvals that are just the representation of pointers. Also all the sites that convert between primvals and pointers are explicit now (and rare!)
Fields
primval: PrimVal
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Methods
impl<'tcx> Pointer
[src]
impl<'tcx> Pointer
pub fn null() -> Self
[src]
pub fn null() -> Self
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn to_ptr(self) -> EvalResult<'tcx, MemoryPointer>
[src]
pub fn to_ptr(self) -> EvalResult<'tcx, MemoryPointer>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn into_inner_primval(self) -> PrimVal
[src]
pub fn into_inner_primval(self) -> PrimVal
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn signed_offset<C: HasDataLayout>(
self,
i: i64,
cx: C
) -> EvalResult<'tcx, Self>
[src]
pub fn signed_offset<C: HasDataLayout>(
self,
i: i64,
cx: C
) -> EvalResult<'tcx, Self>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn offset<C: HasDataLayout>(self, i: u64, cx: C) -> EvalResult<'tcx, Self>
[src]
pub fn offset<C: HasDataLayout>(self, i: u64, cx: C) -> EvalResult<'tcx, Self>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn wrapping_signed_offset<C: HasDataLayout>(
self,
i: i64,
cx: C
) -> EvalResult<'tcx, Self>
[src]
pub fn wrapping_signed_offset<C: HasDataLayout>(
self,
i: i64,
cx: C
) -> EvalResult<'tcx, Self>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn is_null(self) -> EvalResult<'tcx, bool>
[src]
pub fn is_null(self) -> EvalResult<'tcx, bool>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn to_value_with_len(self, len: u64) -> Value
[src]
pub fn to_value_with_len(self, len: u64) -> Value
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn to_value_with_vtable(self, vtable: MemoryPointer) -> Value
[src]
pub fn to_value_with_vtable(self, vtable: MemoryPointer) -> Value
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
pub fn to_value(self) -> Value
[src]
pub fn to_value(self) -> Value
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Trait Implementations
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for Pointer
[src]
impl<'a, 'tcx> HashStable<StableHashingContext<'a>> for Pointer
fn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'a>,
__hasher: &mut StableHasher<W>
)
[src]
fn hash_stable<W: StableHasherResult>(
&self,
__ctx: &mut StableHashingContext<'a>,
__hasher: &mut StableHasher<W>
)
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl Clone for Pointer
[src]
impl Clone for Pointer
fn clone(&self) -> Pointer
[src]
fn clone(&self) -> Pointer
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Copy for Pointer
[src]
impl Copy for Pointer
impl Debug for Pointer
[src]
impl Debug for Pointer
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Eq for Pointer
[src]
impl Eq for Pointer
fn assert_receiver_is_total_eq(&self)
[src]
fn assert_receiver_is_total_eq(&self)
impl PartialEq for Pointer
[src]
impl PartialEq for Pointer
fn eq(&self, other: &Pointer) -> bool
[src]
fn eq(&self, other: &Pointer) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &Pointer) -> bool
[src]
fn ne(&self, other: &Pointer) -> bool
This method tests for !=
.
impl Encodable for Pointer
[src]
impl Encodable for Pointer
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>
[src]
fn encode<__S: Encoder>(&self, s: &mut __S) -> Result<(), __S::Error>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl Decodable for Pointer
[src]
impl Decodable for Pointer
fn decode<__D: Decoder>(d: &mut __D) -> Result<Pointer, __D::Error>
[src]
fn decode<__D: Decoder>(d: &mut __D) -> Result<Pointer, __D::Error>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
impl Hash for Pointer
[src]
impl Hash for Pointer
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl From<PrimVal> for Pointer
[src]
impl From<PrimVal> for Pointer
impl From<MemoryPointer> for Pointer
[src]
impl From<MemoryPointer> for Pointer
fn from(ptr: MemoryPointer) -> Self
[src]
fn from(ptr: MemoryPointer) -> Self
Performs the conversion.