pub struct InterpCx<'mir, 'tcx, M>where
M: Machine<'mir, 'tcx>,{
pub machine: M,
pub tcx: TyCtxtAt<'tcx>,
pub(crate) param_env: ParamEnv<'tcx>,
pub memory: Memory<'mir, 'tcx, M>,
pub recursion_limit: Limit,
}
Fields§
§machine: M
Stores the Machine
instance.
Note: the stack is provided by the machine.
tcx: TyCtxtAt<'tcx>
The results of the type checker, from rustc. The span in this is the “root” of the evaluation, i.e., the const we are evaluating (if this is CTFE).
param_env: ParamEnv<'tcx>
§memory: Memory<'mir, 'tcx, M>
The virtual memory system.
recursion_limit: Limit
The recursion limit (cached from tcx.recursion_limit(())
)
Auto Trait Implementations§
impl<'mir, 'tcx, M> !RefUnwindSafe for InterpCx<'mir, 'tcx, M>
impl<'mir, 'tcx, M> !Send for InterpCx<'mir, 'tcx, M>
impl<'mir, 'tcx, M> !Sync for InterpCx<'mir, 'tcx, M>
impl<'mir, 'tcx, M> Unpin for InterpCx<'mir, 'tcx, M>where M: Unpin, <M as Machine<'mir, 'tcx>>::ExtraFnVal: Unpin, <M as Machine<'mir, 'tcx>>::MemoryMap: Unpin,
impl<'mir, 'tcx, M> !UnwindSafe for InterpCx<'mir, 'tcx, M>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> PointerArithmetic for Twhere
T: HasDataLayout,
impl<T> PointerArithmetic for Twhere T: HasDataLayout,
fn pointer_size(&self) -> Size
fn max_size_of_val(&self) -> Size
fn target_usize_max(&self) -> u64
fn target_isize_min(&self) -> i64
fn target_isize_max(&self) -> i64
fn target_usize_to_isize(&self, val: u64) -> i64
source§fn truncate_to_ptr(&self, _: (u64, bool)) -> (u64, bool)
fn truncate_to_ptr(&self, _: (u64, bool)) -> (u64, bool)
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)
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>>
Layout§
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.