Struct miri::MiriMachine

source ·
pub struct MiriMachine<'mir, 'tcx> {
Show 46 fields pub tcx: TyCtxt<'tcx>, pub borrow_tracker: Option<RefCell<GlobalStateInner>>, pub data_race: Option<GlobalState>, pub alloc_addresses: RefCell<GlobalStateInner>, pub(crate) env_vars: EnvVars<'tcx>, pub(crate) main_fn_ret_place: Option<MPlaceTy<'tcx, Provenance>>, pub(crate) argc: Option<Pointer<Option<Provenance>>>, pub(crate) argv: Option<Pointer<Option<Provenance>>>, pub(crate) cmd_line: Option<Pointer<Option<Provenance>>>, pub(crate) tls: TlsData<'tcx>, pub(crate) isolated_op: IsolatedOp, pub(crate) validate: bool, pub(crate) fds: FdTable, pub(crate) dirs: DirTable, pub(crate) clock: Clock, pub(crate) threads: ThreadManager<'mir, 'tcx>, pub(crate) layouts: PrimitiveLayouts<'tcx>, pub(crate) static_roots: Vec<AllocId>, profiler: Option<Profiler>, string_cache: FxHashMap<String, StringId>, pub(crate) exported_symbols_cache: FxHashMap<Symbol, Option<Instance<'tcx>>>, pub(crate) panic_on_unsupported: bool, pub(crate) backtrace_style: BacktraceStyle, pub(crate) local_crates: Vec<CrateNum>, extern_statics: FxHashMap<Symbol, Pointer<Provenance>>, pub(crate) rng: RefCell<StdRng>, tracked_alloc_ids: FxHashSet<AllocId>, track_alloc_accesses: bool, pub(crate) check_alignment: AlignmentCheck, pub(crate) cmpxchg_weak_failure_rate: f64, pub(crate) mute_stdout_stderr: bool, pub(crate) weak_memory: bool, pub(crate) preemption_rate: f64, pub(crate) report_progress: Option<u32>, pub(crate) basic_block_count: u64, pub native_lib: Option<(Library, PathBuf)>, pub(crate) gc_interval: u32, pub(crate) since_gc: u32, pub(crate) num_cpus: u32, pub(crate) page_size: u64, pub(crate) stack_addr: u64, pub(crate) stack_size: u64, pub(crate) collect_leak_backtraces: bool, pub(crate) allocation_spans: RefCell<FxHashMap<AllocId, (Span, Option<Span>)>>, const_cache: RefCell<FxHashMap<(Const<'tcx>, usize), OpTy<'tcx, Provenance>>>, pub(crate) symbolic_alignment: RefCell<FxHashMap<AllocId, (Size, Align)>>,
Expand description

The machine itself.

If you add anything here that stores machine values, remember to update visit_all_machine_values!


§tcx: TyCtxt<'tcx>§borrow_tracker: Option<RefCell<GlobalStateInner>>

Global data for borrow tracking.

§data_race: Option<GlobalState>

Data race detector global data.

§alloc_addresses: RefCell<GlobalStateInner>

Ptr-int-cast module global data.

§env_vars: EnvVars<'tcx>

Environment variables.

§main_fn_ret_place: Option<MPlaceTy<'tcx, Provenance>>

Return place of the main function.

§argc: Option<Pointer<Option<Provenance>>>

Program arguments (Option because we can only initialize them after creating the ecx). These are pointers to argc/argv because macOS. We also need the full command line as one string because of Windows.

§argv: Option<Pointer<Option<Provenance>>>§cmd_line: Option<Pointer<Option<Provenance>>>§tls: TlsData<'tcx>

TLS state.

§isolated_op: IsolatedOp

What should Miri do when an op requires communicating with the host, such as accessing host env vars, random number generation, and file system access.

§validate: bool

Whether to enforce the validity invariant.

§fds: FdTable

The table of file descriptors.

§dirs: DirTable

The table of directory descriptors.

§clock: Clock

This machine’s monotone clock.

§threads: ThreadManager<'mir, 'tcx>

The set of threads.

§layouts: PrimitiveLayouts<'tcx>

Precomputed TyLayouts for primitive data types that are commonly used inside Miri.

§static_roots: Vec<AllocId>

Allocations that are considered roots of static memory (that may leak).

§profiler: Option<Profiler>

The measureme profiler used to record timing information about the emulated program.

§string_cache: FxHashMap<String, StringId>

Used with profiler to cache the StringIds for event names used with measureme.

§exported_symbols_cache: FxHashMap<Symbol, Option<Instance<'tcx>>>

Cache of Instance exported under the given Symbol name. None means no Instance exported under the given name is found.

§panic_on_unsupported: bool

Whether to raise a panic in the context of the evaluated process when unsupported functionality is encountered. If false, an error is propagated in the Miri application context instead (default behavior)

§backtrace_style: BacktraceStyle

Equivalent setting as RUST_BACKTRACE on encountering an error.

§local_crates: Vec<CrateNum>

Crates which are considered local for the purposes of error reporting.

§extern_statics: FxHashMap<Symbol, Pointer<Provenance>>

Mapping extern static names to their pointer.

§rng: RefCell<StdRng>

The random number generator used for resolving non-determinism. Needs to be queried by ptr_to_int, hence needs interior mutability.

§tracked_alloc_ids: FxHashSet<AllocId>

The allocation IDs to report when they are being allocated (helps for debugging memory leaks and use after free bugs).

§track_alloc_accesses: bool

For the tracked alloc ids, also report read/write accesses.

§check_alignment: AlignmentCheck

Controls whether alignment of memory accesses is being checked.

§cmpxchg_weak_failure_rate: f64

Failure rate of compare_exchange_weak, between 0.0 and 1.0

§mute_stdout_stderr: bool

Corresponds to -Zmiri-mute-stdout-stderr and doesn’t write the output but acts as if it succeeded.

§weak_memory: bool

Whether weak memory emulation is enabled

§preemption_rate: f64

The probability of the active thread being preempted at the end of each basic block.

§report_progress: Option<u32>

If Some, we will report the current stack every N basic blocks.

§basic_block_count: u64§native_lib: Option<(Library, PathBuf)>

Handle of the optional shared object file for native functions.

§gc_interval: u32

Run a garbage collector for BorTags every N basic blocks.

§since_gc: u32

The number of blocks that passed since the last BorTag GC pass.

§num_cpus: u32

The number of CPUs to be reported by miri.

§page_size: u64

Determines Miri’s page size and associated values

§stack_addr: u64§stack_size: u64§collect_leak_backtraces: bool

Whether to collect a backtrace when each allocation is created, just in case it leaks.

§allocation_spans: RefCell<FxHashMap<AllocId, (Span, Option<Span>)>>

The spans we will use to report where an allocation was created and deallocated in diagnostics.

§const_cache: RefCell<FxHashMap<(Const<'tcx>, usize), OpTy<'tcx, Provenance>>>

Maps MIR consts to their evaluated result. We combine the const with a “salt” (usize) that is fixed per stack frame; this lets us have sometimes different results for the same const while ensuring consistent results within a single call.

§symbolic_alignment: RefCell<FxHashMap<AllocId, (Size, Align)>>

For each allocation, an offset inside that allocation that was deemed aligned even for symbolic alignment checks. This cannot be stored in AllocExtra since it needs to be tracked for vtables and function allocations as well as regular allocations.

Invariant: the promised alignment will never be less than the native alignment of the allocation.



impl<'mir, 'tcx> MiriMachine<'mir, 'tcx>


pub fn free_alloc_id( &mut self, dead_id: AllocId, size: Size, align: Align, kind: MemoryKind )


impl<'mir, 'tcx> MiriMachine<'mir, 'tcx>


impl<'mir, 'tcx> MiriMachine<'mir, 'tcx>


pub fn current_span(&self) -> Span

Get the current span in the topmost function which is workspace-local and not #[track_caller]. This function is backed by a cache, and can be assumed to be very fast. It will work even when the stack is empty.


pub fn caller_span(&self) -> Span

Returns the span of the caller of the current operation, again walking down the stack to find the closest frame in a local crate, if the caller of the current operation is not in a local crate. This is useful when we are processing something which occurs on function-entry and we want to point at the call to the function, not the function definition generally.


fn stack(&self) -> &[Frame<'mir, 'tcx, Provenance, FrameExtra<'tcx>>]


fn top_user_relevant_frame(&self) -> Option<usize>


pub fn is_user_relevant(&self, frame: &Frame<'mir, 'tcx, Provenance>) -> bool

This is the source of truth for the is_user_relevant flag in our FrameExtra.


impl<'mir, 'tcx> MiriMachine<'mir, 'tcx>


pub(crate) fn new( config: &MiriConfig, layout_cx: LayoutCx<'tcx, TyCtxt<'tcx>> ) -> Self


pub(crate) fn late_init( this: &mut MiriInterpCx<'mir, 'tcx>, config: &MiriConfig, on_main_stack_empty: StackEmptyCallback<'mir, 'tcx> ) -> InterpResult<'tcx>


pub(crate) fn add_extern_static( this: &mut MiriInterpCx<'mir, 'tcx>, name: &str, ptr: Pointer<Option<Provenance>> )


pub(crate) fn communicate(&self) -> bool


pub(crate) fn is_local(&self, frame: &FrameInfo<'_>) -> bool

Check whether the stack frame that this FrameInfo refers to is part of a local crate.


pub(crate) fn handle_abnormal_termination(&mut self)

Called when the interpreter is going to shut down abnormally, such as due to a Ctrl-C.


pub(crate) fn page_align(&self) -> Align


pub(crate) fn allocated_span(&self, alloc_id: AllocId) -> Option<SpanData>


pub(crate) fn deallocated_span(&self, alloc_id: AllocId) -> Option<SpanData>


impl<'mir, 'tcx> MiriMachine<'mir, 'tcx>


fn alloc_extern_static( this: &mut MiriInterpCx<'mir, 'tcx>, name: &str, val: ImmTy<'tcx, Provenance> ) -> InterpResult<'tcx>


fn null_ptr_extern_statics( this: &mut MiriInterpCx<'mir, 'tcx>, names: &[&str] ) -> InterpResult<'tcx>

Zero-initialized pointer-sized extern statics are pretty common. Most of them are for weak symbols, which we all set to null (indicating that the symbol is not supported, and triggering fallback code which ends up calling some other shim that we do support).


fn weak_symbol_extern_statics( this: &mut MiriInterpCx<'mir, 'tcx>, names: &[&str] ) -> InterpResult<'tcx>

Extern statics that are initialized with function pointers to the symbols of the same name.


pub fn init_extern_statics( this: &mut MiriInterpCx<'mir, 'tcx> ) -> InterpResult<'tcx>

Sets up the “extern statics” for this machine.

Trait Implementations§


impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx>

Machine hook implementations.


fn ptr_from_addr_cast( ecx: &MiriInterpCx<'mir, 'tcx>, addr: u64 ) -> InterpResult<'tcx, Pointer<Option<Self::Provenance>>>

Called on usize as ptr casts.


fn expose_ptr( ecx: &mut InterpCx<'mir, 'tcx, Self>, ptr: Pointer<Self::Provenance> ) -> InterpResult<'tcx>

Called on ptr as usize casts. (Actually computing the resulting usize doesn’t need machine help, that’s just Scalar::try_to_int.)


fn ptr_get_alloc( ecx: &MiriInterpCx<'mir, 'tcx>, ptr: Pointer<Self::Provenance> ) -> Option<(AllocId, Size, Self::ProvenanceExtra)>

Convert a pointer with provenance into an allocation-offset pair, or a None with an absolute address if that conversion is not possible.

This is called when a pointer is about to be used for memory access, an in-bounds check, or anything else that requires knowing which allocation it points to. The resulting AllocId will just be used for that one step and the forgotten again (i.e., we’ll never turn the data returned here back into a Pointer that might be stored in machine state).


type MemoryKind = MiriMemoryKind

Additional memory kinds a machine wishes to distinguish from the builtin ones

type ExtraFnVal = DynSym

Machines can define extra (non-instance) things that represent values of function pointers. For example, Miri uses this to return a function pointer from dlsym that can later be called to execute the right thing.

type FrameExtra = FrameExtra<'tcx>

Extra data stored in every call frame.

type AllocExtra = AllocExtra<'tcx>

Extra data stored in every allocation.

type Provenance = Provenance

Pointers are “tagged” with provenance information; typically the AllocId they belong to.

type ProvenanceExtra = ProvenanceExtra

When getting the AllocId of a pointer, some extra data is also obtained from the provenance that is passed to memory access hooks so they can do things with it.

type Bytes = MiriAllocBytes

Type for the bytes of the allocation.

type MemoryMap = MonoHashMap<AllocId, (MemoryKind<MiriMemoryKind>, Allocation<Provenance, <MiriMachine<'mir, 'tcx> as Machine<'mir, 'tcx>>::AllocExtra, <MiriMachine<'mir, 'tcx> as Machine<'mir, 'tcx>>::Bytes>)>

Memory’s allocation map

const GLOBAL_KIND: Option<MiriMemoryKind> = _

The memory kind to use for copied global memory (held in tcx) – or None if such memory should not be mutated and thus any such attempt will cause a ModifiedStatic error to be raised. Statics are copied under two circumstances: When they are mutated, and when adjust_allocation (see below) returns an owned allocation that is added to the memory so that the work is not done twice.

const PANIC_ON_ALLOC_FAIL: bool = false

Should the machine panic on allocation failures?

fn enforce_alignment(ecx: &MiriInterpCx<'mir, 'tcx>) -> bool

Whether memory accesses should be alignment-checked.

fn alignment_check( ecx: &MiriInterpCx<'mir, 'tcx>, alloc_id: AllocId, alloc_align: Align, alloc_kind: AllocKind, offset: Size, align: Align ) -> Option<Misalignment>

Gives the machine a chance to detect more misalignment than the built-in checks would catch.

fn enforce_validity( ecx: &MiriInterpCx<'mir, 'tcx>, _layout: TyAndLayout<'tcx> ) -> bool

Whether to enforce the validity invariant for a specific layout.

fn enforce_abi(_ecx: &MiriInterpCx<'mir, 'tcx>) -> bool

Whether function calls should be ABI-checked.

fn ignore_optional_overflow_checks(ecx: &MiriInterpCx<'mir, 'tcx>) -> bool

Whether Assert(OverflowNeg) and Assert(Overflow) MIR terminators should actually check for overflow.

fn find_mir_or_eval_fn( ecx: &mut MiriInterpCx<'mir, 'tcx>, instance: Instance<'tcx>, abi: Abi, args: &[FnArg<'tcx, Provenance>], dest: &MPlaceTy<'tcx, Provenance>, ret: Option<BasicBlock>, unwind: UnwindAction ) -> InterpResult<'tcx, Option<(&'mir Body<'tcx>, Instance<'tcx>)>>

Entry point to all function calls. Read more

fn call_extra_fn( ecx: &mut MiriInterpCx<'mir, 'tcx>, fn_val: DynSym, abi: Abi, args: &[FnArg<'tcx, Provenance>], dest: &MPlaceTy<'tcx, Provenance>, ret: Option<BasicBlock>, unwind: UnwindAction ) -> InterpResult<'tcx>

Execute fn_val. It is the hook’s responsibility to advance the instruction pointer as appropriate.

fn call_intrinsic( ecx: &mut MiriInterpCx<'mir, 'tcx>, instance: Instance<'tcx>, args: &[OpTy<'tcx, Provenance>], dest: &MPlaceTy<'tcx, Provenance>, ret: Option<BasicBlock>, unwind: UnwindAction ) -> InterpResult<'tcx, Option<Instance<'tcx>>>

Directly process an intrinsic without pushing a stack frame. It is the hook’s responsibility to advance the instruction pointer as appropriate. Read more

fn assert_panic( ecx: &mut MiriInterpCx<'mir, 'tcx>, msg: &AssertMessage<'tcx>, unwind: UnwindAction ) -> InterpResult<'tcx>

Called to evaluate Assert MIR terminators that trigger a panic.

fn panic_nounwind( ecx: &mut InterpCx<'mir, 'tcx, Self>, msg: &str ) -> InterpResult<'tcx>

Called to trigger a non-unwinding panic.

fn unwind_terminate( ecx: &mut InterpCx<'mir, 'tcx, Self>, reason: UnwindTerminateReason ) -> InterpResult<'tcx>

Called when unwinding reached a state where execution should be terminated.

fn binary_ptr_op( ecx: &MiriInterpCx<'mir, 'tcx>, bin_op: BinOp, left: &ImmTy<'tcx, Provenance>, right: &ImmTy<'tcx, Provenance> ) -> InterpResult<'tcx, ImmTy<'tcx, Provenance>>

Called for all binary operations where the LHS has pointer type. Read more

fn generate_nan<F1: Float + FloatConvert<F2>, F2: Float>( ecx: &InterpCx<'mir, 'tcx, Self>, inputs: &[F1] ) -> F2

Generate the NaN returned by a float operation, given the list of inputs. (This is all inputs, not just NaN inputs!)

fn thread_local_static_pointer( ecx: &mut MiriInterpCx<'mir, 'tcx>, def_id: DefId ) -> InterpResult<'tcx, Pointer<Provenance>>

Return the AllocId for the given thread-local static in the current thread.

fn extern_static_pointer( ecx: &MiriInterpCx<'mir, 'tcx>, def_id: DefId ) -> InterpResult<'tcx, Pointer<Provenance>>

Return the AllocId for the given extern static.

fn adjust_allocation<'b>( ecx: &MiriInterpCx<'mir, 'tcx>, id: AllocId, alloc: Cow<'b, Allocation>, kind: Option<MemoryKind> ) -> InterpResult<'tcx, Cow<'b, Allocation<Self::Provenance, Self::AllocExtra, Self::Bytes>>>

Called to adjust allocations to the Provenance and AllocExtra of this machine. Read more

fn adjust_alloc_root_pointer( ecx: &MiriInterpCx<'mir, 'tcx>, ptr: Pointer<CtfeProvenance>, kind: Option<MemoryKind> ) -> InterpResult<'tcx, Pointer<Provenance>>

Return a “root” pointer for the given allocation: the one that is used for direct accesses to this static/const/fn allocation, or the one returned from the heap allocator. Read more

fn before_memory_read( _tcx: TyCtxtAt<'tcx>, machine: &Self, alloc_extra: &AllocExtra<'tcx>, (alloc_id, prov_extra): (AllocId, Self::ProvenanceExtra), range: AllocRange ) -> InterpResult<'tcx>

Hook for performing extra checks on a memory read access. Read more

fn before_memory_write( _tcx: TyCtxtAt<'tcx>, machine: &mut Self, alloc_extra: &mut AllocExtra<'tcx>, (alloc_id, prov_extra): (AllocId, Self::ProvenanceExtra), range: AllocRange ) -> InterpResult<'tcx>

Hook for performing extra checks on a memory write access. This is not invoked for ZST accesses, as no write actually happens.

fn before_memory_deallocation( _tcx: TyCtxtAt<'tcx>, machine: &mut Self, alloc_extra: &mut AllocExtra<'tcx>, (alloc_id, prove_extra): (AllocId, Self::ProvenanceExtra), size: Size, align: Align, kind: MemoryKind ) -> InterpResult<'tcx>

Hook for performing extra operations on a memory deallocation.

fn retag_ptr_value( ecx: &mut InterpCx<'mir, 'tcx, Self>, kind: RetagKind, val: &ImmTy<'tcx, Provenance> ) -> InterpResult<'tcx, ImmTy<'tcx, Provenance>>

Executes a retagging operation for a single pointer. Returns the possibly adjusted pointer.

fn retag_place_contents( ecx: &mut InterpCx<'mir, 'tcx, Self>, kind: RetagKind, place: &PlaceTy<'tcx, Provenance> ) -> InterpResult<'tcx>

Executes a retagging operation on a compound value. Replaces all pointers stored in the given place.

fn protect_in_place_function_argument( ecx: &mut InterpCx<'mir, 'tcx, Self>, place: &MPlaceTy<'tcx, Provenance> ) -> InterpResult<'tcx>

Called on places used for in-place function argument and return value handling. Read more

fn init_frame_extra( ecx: &mut InterpCx<'mir, 'tcx, Self>, frame: Frame<'mir, 'tcx, Provenance> ) -> InterpResult<'tcx, Frame<'mir, 'tcx, Provenance, FrameExtra<'tcx>>>

Called immediately before a new stack frame gets pushed.

fn stack<'a>( ecx: &'a InterpCx<'mir, 'tcx, Self> ) -> &'a [Frame<'mir, 'tcx, Self::Provenance, Self::FrameExtra>]

Borrow the current thread’s stack.

fn stack_mut<'a>( ecx: &'a mut InterpCx<'mir, 'tcx, Self> ) -> &'a mut Vec<Frame<'mir, 'tcx, Self::Provenance, Self::FrameExtra>>

Mutably borrow the current thread’s stack.

fn before_terminator(ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx>

Called before a basic block terminator is executed.

fn after_stack_push(ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx>

Called immediately after a stack frame got pushed and its locals got initialized.

fn before_stack_pop( ecx: &InterpCx<'mir, 'tcx, Self>, frame: &Frame<'mir, 'tcx, Self::Provenance, Self::FrameExtra> ) -> InterpResult<'tcx>

Called just before the return value is copied to the caller-provided return place.

fn after_stack_pop( ecx: &mut InterpCx<'mir, 'tcx, Self>, frame: Frame<'mir, 'tcx, Provenance, FrameExtra<'tcx>>, unwinding: bool ) -> InterpResult<'tcx, StackPopJump>

Called immediately after a stack frame got popped, but before jumping back to the caller. The locals have already been destroyed!

fn after_local_allocated( ecx: &mut InterpCx<'mir, 'tcx, Self>, local: Local, mplace: &MPlaceTy<'tcx, Provenance> ) -> InterpResult<'tcx>

Called immediately after actual memory was allocated for a local but before the local’s stack frame is updated to point to that memory.

fn eval_mir_constant<F>( ecx: &InterpCx<'mir, 'tcx, Self>, val: Const<'tcx>, span: Span, layout: Option<TyAndLayout<'tcx>>, eval: F ) -> InterpResult<'tcx, OpTy<'tcx, Self::Provenance>>
where F: Fn(&InterpCx<'mir, 'tcx, Self>, Const<'tcx>, Span, Option<TyAndLayout<'tcx>>) -> InterpResult<'tcx, OpTy<'tcx, Self::Provenance>>,

Evaluate the given constant. The eval function will do all the required evaluation, but this hook has the chance to do some pre/postprocessing.

const ALL_CONSTS_ARE_PRECHECKED: bool = true

Determines whether eval_mir_constant can never fail because all required consts have already been checked before.

fn load_mir( ecx: &InterpCx<'mir, 'tcx, Self>, instance: InstanceDef<'tcx> ) -> Result<&'tcx Body<'tcx>, InterpErrorInfo<'tcx>>

Entry point for obtaining the MIR of anything that should get evaluated. So not just functions and shims, but also const/static initializers, anonymous constants, …

fn increment_const_eval_counter( _ecx: &mut InterpCx<'mir, 'tcx, Self> ) -> Result<(), InterpErrorInfo<'tcx>>

Called when the interpreter encounters a StatementKind::ConstEvalCounter instruction. You can use this to detect long or endlessly running programs.

fn before_access_global( _tcx: TyCtxtAt<'tcx>, _machine: &Self, _alloc_id: AllocId, _allocation: ConstAllocation<'tcx>, _static_def_id: Option<DefId>, _is_write: bool ) -> Result<(), InterpErrorInfo<'tcx>>

Called before a global allocation is accessed. def_id is Some if this is the “lazy” allocation of a static.

fn eval_inline_asm( _ecx: &mut InterpCx<'mir, 'tcx, Self>, _template: &'tcx [InlineAsmTemplatePiece], _operands: &[InlineAsmOperand<'tcx>], _options: InlineAsmOptions, _targets: &[BasicBlock] ) -> Result<(), InterpErrorInfo<'tcx>>

Evaluate the inline assembly. Read more

fn before_alloc_read( _ecx: &InterpCx<'mir, 'tcx, Self>, _alloc_id: AllocId ) -> Result<(), InterpErrorInfo<'tcx>>

Hook for performing extra checks on any memory read access, that involves an allocation, even ZST reads. Read more

impl VisitProvenance for MiriMachine<'_, '_>


fn visit_provenance(&self, visit: &mut VisitWith<'_>)

Auto Trait Implementations§


impl<'mir, 'tcx> !Freeze for MiriMachine<'mir, 'tcx>


impl<'mir, 'tcx> !RefUnwindSafe for MiriMachine<'mir, 'tcx>


impl<'mir, 'tcx> !Send for MiriMachine<'mir, 'tcx>


impl<'mir, 'tcx> !Sync for MiriMachine<'mir, 'tcx>


impl<'mir, 'tcx> Unpin for MiriMachine<'mir, 'tcx>


impl<'mir, 'tcx> !UnwindSafe for MiriMachine<'mir, 'tcx>

Blanket Implementations§


impl<T> Any for T
where T: 'static + ?Sized,


fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T
where T: ?Sized,


fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T
where T: ?Sized,


fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more

impl<T> From<T> for T


fn from(t: T) -> T

Returns the argument unchanged.


impl<T, U> Into<U> for T
where U: From<T>,


fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.


impl<T> Same for T


type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T
where U: Into<T>,


type Error = Infallible

The type returned in the event of a conversion error.

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,


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

The type returned in the event of a conversion error.

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

impl<V, T> VZip<V> for T
where V: MultiLane<T>,


fn vzip(self) -> V


Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.

Size: 2432 bytes