[−][src]Struct rustc_mir::interpret::Memory
🔬 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?
Fields
data: M::MemoryData
🔬 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?
Additional data required by the Machine
alloc_map: FxHashMap<AllocId, (MemoryKind<M::MemoryKinds>, Allocation)>
🔬 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?
Allocations local to this instance of the miri engine. The kind
helps ensure that the same mechanism is used for allocation and
deallocation. When an allocation is not found here, it is a
static and looked up in the tcx
for read access. Writing to
a static creates a copy here, in the machine.
dead_alloc_map: FxHashMap<AllocId, (Size, Align)>
🔬 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?
To be able to compare pointers with NULL, and to check alignment for accesses to ZSTs (where pointers may dangle), we keep track of the size even for allocations that do not exist any more.
tcx: TyCtxtAt<'a, 'tcx, 'tcx>
🔬 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<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
pub fn new(tcx: TyCtxtAt<'a, 'tcx, 'tcx>, data: M::MemoryData) -> Self
[src]
pub fn new(tcx: TyCtxtAt<'a, 'tcx, 'tcx>, data: M::MemoryData) -> 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 create_fn_alloc(&mut self, instance: Instance<'tcx>) -> Pointer
[src]
pub fn create_fn_alloc(&mut self, instance: Instance<'tcx>) -> Pointer
🔬 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 allocate_static_bytes(&mut self, bytes: &[u8]) -> Pointer
[src]
pub fn allocate_static_bytes(&mut self, bytes: &[u8]) -> Pointer
🔬 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 allocate_with(
&mut self,
alloc: Allocation,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx, AllocId>
[src]
pub fn allocate_with(
&mut self,
alloc: Allocation,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx, AllocId>
🔬 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 allocate(
&mut self,
size: Size,
align: Align,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx, Pointer>
[src]
pub fn allocate(
&mut self,
size: Size,
align: Align,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx, Pointer>
🔬 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 reallocate(
&mut self,
ptr: Pointer,
old_size: Size,
old_align: Align,
new_size: Size,
new_align: Align,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx, Pointer>
[src]
pub fn reallocate(
&mut self,
ptr: Pointer,
old_size: Size,
old_align: Align,
new_size: Size,
new_align: Align,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx, Pointer>
🔬 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 deallocate_local(&mut self, ptr: Pointer) -> EvalResult<'tcx>
[src]
pub fn deallocate_local(&mut self, ptr: Pointer) -> EvalResult<'tcx>
🔬 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?
Deallocate a local, or do nothing if that local has been made into a static
pub fn deallocate(
&mut self,
ptr: Pointer,
size_and_align: Option<(Size, Align)>,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx>
[src]
pub fn deallocate(
&mut self,
ptr: Pointer,
size_and_align: Option<(Size, Align)>,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx>
🔬 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 check_align(
&self,
ptr: Scalar,
required_align: Align
) -> EvalResult<'tcx>
[src]
pub fn check_align(
&self,
ptr: Scalar,
required_align: Align
) -> EvalResult<'tcx>
🔬 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?
Check that the pointer is aligned AND non-NULL. This supports ZSTs in two ways:
You can pass a scalar, and a Pointer
does not have to actually still be allocated.
pub fn check_bounds(&self, ptr: Pointer, access: bool) -> EvalResult<'tcx>
[src]
pub fn check_bounds(&self, ptr: Pointer, access: bool) -> EvalResult<'tcx>
🔬 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?
Check if the pointer is "in-bounds". Notice that a pointer pointing at the end
of an allocation (i.e., at the first inaccessible location) is considered
in-bounds! This follows C's/LLVM's rules. The access
boolean is just used
for the error message.
If you want to check bounds before doing a memory access, be sure to
check the pointer one past the end of your access, then everything will
work out exactly.
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
Allocation accessors
fn get_static_alloc(
tcx: TyCtxtAt<'a, 'tcx, 'tcx>,
id: AllocId
) -> EvalResult<'tcx, &'tcx Allocation>
[src]
fn get_static_alloc(
tcx: TyCtxtAt<'a, 'tcx, 'tcx>,
id: AllocId
) -> EvalResult<'tcx, &'tcx Allocation>
🔬 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?
Helper function to obtain the global (tcx) allocation for a static
pub fn get(&self, id: AllocId) -> EvalResult<'tcx, &Allocation>
[src]
pub fn get(&self, id: AllocId) -> EvalResult<'tcx, &Allocation>
🔬 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 get_size_and_align(&self, id: AllocId) -> EvalResult<'tcx, (Size, Align)>
[src]
pub fn get_size_and_align(&self, id: AllocId) -> EvalResult<'tcx, (Size, Align)>
🔬 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 get_mut(&mut self, id: AllocId) -> EvalResult<'tcx, &mut Allocation>
[src]
pub fn get_mut(&mut self, id: AllocId) -> EvalResult<'tcx, &mut Allocation>
🔬 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 get_fn(&self, ptr: Pointer) -> EvalResult<'tcx, Instance<'tcx>>
[src]
pub fn get_fn(&self, ptr: Pointer) -> EvalResult<'tcx, Instance<'tcx>>
🔬 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 dump_alloc(&self, id: AllocId)
[src]
pub fn dump_alloc(&self, id: AllocId)
🔬 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?
For debugging, print an allocation and all allocations it points to, recursively.
pub fn dump_allocs(&self, allocs: Vec<AllocId>)
[src]
pub fn dump_allocs(&self, allocs: Vec<AllocId>)
🔬 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?
For debugging, print a list of allocations and all allocations they point to, recursively.
pub fn leak_report(&self) -> usize
[src]
pub fn leak_report(&self) -> usize
🔬 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<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
Byte accessors
fn get_bytes_internal(
&self,
ptr: Pointer,
size: Size,
align: Align,
check_defined_and_ptr: bool
) -> EvalResult<'tcx, &[u8]>
[src]
fn get_bytes_internal(
&self,
ptr: Pointer,
size: Size,
align: Align,
check_defined_and_ptr: bool
) -> EvalResult<'tcx, &[u8]>
🔬 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?
The last argument controls whether we error out when there are undefined
or pointer bytes. You should never call this, call get_bytes
or
get_bytes_with_undef_and_ptr
instead,
fn get_bytes(
&self,
ptr: Pointer,
size: Size,
align: Align
) -> EvalResult<'tcx, &[u8]>
[src]
fn get_bytes(
&self,
ptr: Pointer,
size: Size,
align: Align
) -> EvalResult<'tcx, &[u8]>
🔬 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?
fn get_bytes_with_undef_and_ptr(
&self,
ptr: Pointer,
size: Size,
align: Align
) -> EvalResult<'tcx, &[u8]>
[src]
fn get_bytes_with_undef_and_ptr(
&self,
ptr: Pointer,
size: Size,
align: Align
) -> EvalResult<'tcx, &[u8]>
🔬 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?
It is the caller's responsibility to handle undefined and pointer bytes. However, this still checks that there are no relocations on the egdes.
fn get_bytes_mut(
&mut self,
ptr: Pointer,
size: Size,
align: Align
) -> EvalResult<'tcx, &mut [u8]>
[src]
fn get_bytes_mut(
&mut self,
ptr: Pointer,
size: Size,
align: Align
) -> EvalResult<'tcx, &mut [u8]>
🔬 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?
Just calling this already marks everything as defined and removes relocations, so be sure to actually put data there!
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
Reading and writing
pub fn intern_static(
&mut self,
alloc_id: AllocId,
mutability: Mutability
) -> EvalResult<'tcx>
[src]
pub fn intern_static(
&mut self,
alloc_id: AllocId,
mutability: Mutability
) -> EvalResult<'tcx>
🔬 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?
mark an allocation as static and initialized, either mutable or not
fn deep_copy_static(
&mut self,
id: AllocId,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx>
[src]
fn deep_copy_static(
&mut self,
id: AllocId,
kind: MemoryKind<M::MemoryKinds>
) -> EvalResult<'tcx>
🔬 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?
The alloc_id must refer to a (mutable) static; a deep copy of that static is made into this memory.
pub fn copy(
&mut self,
src: Scalar,
src_align: Align,
dest: Scalar,
dest_align: Align,
size: Size,
nonoverlapping: bool
) -> EvalResult<'tcx>
[src]
pub fn copy(
&mut self,
src: Scalar,
src_align: Align,
dest: Scalar,
dest_align: Align,
size: Size,
nonoverlapping: bool
) -> EvalResult<'tcx>
🔬 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 copy_repeatedly(
&mut self,
src: Scalar,
src_align: Align,
dest: Scalar,
dest_align: Align,
size: Size,
length: u64,
nonoverlapping: bool
) -> EvalResult<'tcx>
[src]
pub fn copy_repeatedly(
&mut self,
src: Scalar,
src_align: Align,
dest: Scalar,
dest_align: Align,
size: Size,
length: u64,
nonoverlapping: bool
) -> EvalResult<'tcx>
🔬 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 read_c_str(&self, ptr: Pointer) -> EvalResult<'tcx, &[u8]>
[src]
pub fn read_c_str(&self, ptr: Pointer) -> EvalResult<'tcx, &[u8]>
🔬 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 read_bytes(&self, ptr: Scalar, size: Size) -> EvalResult<'tcx, &[u8]>
[src]
pub fn read_bytes(&self, ptr: Scalar, size: Size) -> EvalResult<'tcx, &[u8]>
🔬 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 write_bytes(&mut self, ptr: Scalar, src: &[u8]) -> EvalResult<'tcx>
[src]
pub fn write_bytes(&mut self, ptr: Scalar, src: &[u8]) -> EvalResult<'tcx>
🔬 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 write_repeat(
&mut self,
ptr: Scalar,
val: u8,
count: Size
) -> EvalResult<'tcx>
[src]
pub fn write_repeat(
&mut self,
ptr: Scalar,
val: u8,
count: Size
) -> EvalResult<'tcx>
🔬 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 read_scalar(
&self,
ptr: Pointer,
ptr_align: Align,
size: Size
) -> EvalResult<'tcx, ScalarMaybeUndef>
[src]
pub fn read_scalar(
&self,
ptr: Pointer,
ptr_align: Align,
size: Size
) -> EvalResult<'tcx, ScalarMaybeUndef>
🔬 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?
Read a non-ZST scalar
pub fn read_ptr_sized(
&self,
ptr: Pointer,
ptr_align: Align
) -> EvalResult<'tcx, ScalarMaybeUndef>
[src]
pub fn read_ptr_sized(
&self,
ptr: Pointer,
ptr_align: Align
) -> EvalResult<'tcx, ScalarMaybeUndef>
🔬 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 write_scalar(
&mut self,
ptr: Pointer,
ptr_align: Align,
val: ScalarMaybeUndef,
type_size: Size
) -> EvalResult<'tcx>
[src]
pub fn write_scalar(
&mut self,
ptr: Pointer,
ptr_align: Align,
val: ScalarMaybeUndef,
type_size: Size
) -> EvalResult<'tcx>
🔬 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?
Write a non-ZST scalar
pub fn write_ptr_sized(
&mut self,
ptr: Pointer,
ptr_align: Align,
val: ScalarMaybeUndef
) -> EvalResult<'tcx>
[src]
pub fn write_ptr_sized(
&mut self,
ptr: Pointer,
ptr_align: Align,
val: ScalarMaybeUndef
) -> EvalResult<'tcx>
🔬 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?
fn int_align(&self, size: Size) -> Align
[src]
fn int_align(&self, size: Size) -> Align
🔬 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<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
Relocations
fn relocations(
&self,
ptr: Pointer,
size: Size
) -> EvalResult<'tcx, &[(Size, AllocId)]>
[src]
fn relocations(
&self,
ptr: Pointer,
size: Size
) -> EvalResult<'tcx, &[(Size, AllocId)]>
🔬 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?
Return all relocations overlapping with the given ptr-offset pair.
fn check_relocations(&self, ptr: Pointer, size: Size) -> EvalResult<'tcx>
[src]
fn check_relocations(&self, ptr: Pointer, size: Size) -> EvalResult<'tcx>
🔬 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?
Check that there ar eno relocations overlapping with the given range.
fn clear_relocations(&mut self, ptr: Pointer, size: Size) -> EvalResult<'tcx>
[src]
fn clear_relocations(&mut self, ptr: Pointer, size: Size) -> EvalResult<'tcx>
🔬 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?
Remove all relocations inside the given range. If there are relocations overlapping with the edges, they are removed as well and the bytes they cover are marked as uninitialized. This is a somewhat odd "spooky action at a distance", but it allows strictly more code to run than if we would just error immediately in that case.
fn check_relocation_edges(&self, ptr: Pointer, size: Size) -> EvalResult<'tcx>
[src]
fn check_relocation_edges(&self, ptr: Pointer, size: Size) -> EvalResult<'tcx>
🔬 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?
Error if there are relocations overlapping with the egdes of the given memory range.
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> Memory<'a, 'mir, 'tcx, M>
Undefined bytes
fn copy_undef_mask(
&mut self,
src: Pointer,
dest: Pointer,
size: Size,
repeat: u64
) -> EvalResult<'tcx>
[src]
fn copy_undef_mask(
&mut self,
src: Pointer,
dest: Pointer,
size: Size,
repeat: u64
) -> EvalResult<'tcx>
🔬 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?
fn check_defined(&self, ptr: Pointer, size: Size) -> EvalResult<'tcx>
[src]
fn check_defined(&self, ptr: Pointer, size: Size) -> EvalResult<'tcx>
🔬 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?
Checks that a range of bytes is defined. If not, returns the ReadUndefBytes
error which will report the first byte which is undefined.
pub fn mark_definedness(
&mut self,
ptr: Pointer,
size: Size,
new_state: bool
) -> EvalResult<'tcx>
[src]
pub fn mark_definedness(
&mut self,
ptr: Pointer,
size: Size,
new_state: bool
) -> EvalResult<'tcx>
🔬 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<'a, 'mir, 'tcx, M> Memory<'a, 'mir, 'tcx, M> where
M: Machine<'mir, 'tcx>,
[src]
impl<'a, 'mir, 'tcx, M> Memory<'a, 'mir, 'tcx, M> where
M: Machine<'mir, 'tcx>,
fn snapshot<'b: 'a>(&'b self) -> MemorySnapshot<'b, 'mir, 'tcx, M>
[src]
fn snapshot<'b: 'a>(&'b self) -> MemorySnapshot<'b, 'mir, 'tcx, M>
🔬 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, 'mir, 'tcx: 'a + 'mir, M: Clone + Machine<'mir, 'tcx>> Clone for Memory<'a, 'mir, 'tcx, M> where
M::MemoryData: Clone,
M::MemoryKinds: Clone,
[src]
impl<'a, 'mir, 'tcx: 'a + 'mir, M: Clone + Machine<'mir, 'tcx>> Clone for Memory<'a, 'mir, 'tcx, M> where
M::MemoryData: Clone,
M::MemoryKinds: Clone,
fn clone(&self) -> Memory<'a, 'mir, 'tcx, M>
[src]
fn clone(&self) -> Memory<'a, 'mir, 'tcx, M>
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<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> HasDataLayout for &'a Memory<'a, 'mir, 'tcx, M>
[src]
impl<'a, 'mir, 'tcx, M: Machine<'mir, 'tcx>> HasDataLayout for &'a Memory<'a, 'mir, 'tcx, M>
fn data_layout(&self) -> &TargetDataLayout
[src]
fn data_layout(&self) -> &TargetDataLayout
🔬 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<'a, 'b, 'mir, 'tcx, M> SnapshotContext<'b> for Memory<'a, 'mir, 'tcx, M> where
M: Machine<'mir, 'tcx>,
[src]
impl<'a, 'b, 'mir, 'tcx, M> SnapshotContext<'b> for Memory<'a, 'mir, 'tcx, M> where
M: Machine<'mir, 'tcx>,
fn resolve(&'b self, id: &AllocId) -> Option<&'b Allocation>
[src]
fn resolve(&'b self, id: &AllocId) -> Option<&'b Allocation>
🔬 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?
Auto Trait Implementations
impl<'a, 'mir, 'tcx, M> !Send for Memory<'a, 'mir, 'tcx, M>
impl<'a, 'mir, 'tcx, M> !Send for Memory<'a, 'mir, 'tcx, M>
impl<'a, 'mir, 'tcx, M> !Sync for Memory<'a, 'mir, 'tcx, M>
impl<'a, 'mir, 'tcx, M> !Sync for Memory<'a, 'mir, 'tcx, M>
Blanket Implementations
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
type Owned = T
fn to_owned(&self) -> T
[src]
fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
fn clone_into(&self, target: &mut T)
[src]
fn clone_into(&self, target: &mut T)
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
impl<T> From for T
[src]
impl<T> From for T
impl<T, U> Into for T where
U: From<T>,
[src]
impl<T, U> Into for T where
U: From<T>,
impl<T, U> TryFrom for T where
T: From<U>,
[src]
impl<T, U> TryFrom for T where
T: From<U>,
type Error = !
try_from
)The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
try_from
)Performs the conversion.
impl<T> Borrow for T where
T: ?Sized,
[src]
impl<T> Borrow for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow(&self) -> &T
[src]
fn borrow(&self) -> &T
Immutably borrows from an owned value. Read more
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
try_from
)The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
try_from
)Performs the conversion.
impl<T> BorrowMut for T where
T: ?Sized,
[src]
impl<T> BorrowMut for T where
T: ?Sized,
ⓘImportant traits for &'a mut Rfn borrow_mut(&mut self) -> &mut T
[src]
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Any for T where
T: 'static + ?Sized,
[src]
impl<T> Any for T where
T: 'static + ?Sized,
fn get_type_id(&self) -> TypeId
[src]
fn get_type_id(&self) -> TypeId
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
Gets the TypeId
of self
. Read more
impl<E> SpecializationError for E
[src]
impl<E> SpecializationError for E
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
[src]
fn not_found<S, T>(trait_name: &'static str, method_name: &'static str) -> E where
T: ?Sized,
🔬 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?
Create an error for a missing method specialization. Defaults to panicking with type, trait & method names. S
is the encoder/decoder state type, T
is the type being encoded/decoded, and the arguments are the names of the trait and method that should've been overridden. Read more
impl<T> Erased for T
[src]
impl<T> Erased for T
impl<T> Send for T where
T: ?Sized,
[src]
impl<T> Send for T where
T: ?Sized,
impl<T> Sync for T where
T: ?Sized,
[src]
impl<T> Sync for T where
T: ?Sized,
impl<T> Erased for T
impl<T> Erased for T
impl<T> MaybeResult for T
[src]
impl<T> MaybeResult for T
fn from_ok(x: T) -> T
[src]
fn from_ok(x: T) -> T
🔬 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?
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
[src]
fn map_same<F>(self, f: F) -> T where
F: FnOnce(T) -> T,
🔬 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<'a, T> Captures for T where
T: ?Sized,
[src]
impl<'a, T> Captures for T where
T: ?Sized,