Skip to main content

Module machine

Module machine 

Source

Re-exportsΒ§

use std::borrow::Borrow; πŸ”’
use std::borrow::Cow; πŸ”’
use std::hash::Hash; πŸ”’
use std::hash::Hash; πŸ”’
use std::fmt; πŸ”’
use std::mem; πŸ”’
use rustc_abi::Align; πŸ”’
use rustc_abi::FIRST_VARIANT; πŸ”’
use rustc_abi::FieldIdx; πŸ”’
use rustc_abi::Size; πŸ”’
use rustc_abi::VariantIdx; πŸ”’
use rustc_ast::Mutability; πŸ”’
use rustc_attr_ir::find_attr; πŸ”’
use rustc_attr_ir::lang_items::LangItem; πŸ”’
use rustc_data_structures::fx::FxHashMap; πŸ”’
use rustc_data_structures::fx::FxIndexMap; πŸ”’
use rustc_data_structures::fx::IndexEntry; πŸ”’
use rustc_hir::def_id::DefId; πŸ”’
use rustc_hir::def_id::LocalDefId; πŸ”’
use rustc_hir::CRATE_HIR_ID; πŸ”’
use rustc_hir::HirId; πŸ”’
use rustc_lint_defs::builtin::LONG_RUNNING_CONST_EVAL; πŸ”’
use rustc_middle::mir::AssertMessage; πŸ”’
use rustc_middle::mir::interpret::ReportedErrorInfo; πŸ”’
use rustc_middle::query::TyCtxtAt; πŸ”’
use rustc_middle::ty::layout::HasTyCtxt; πŸ”’
use rustc_middle::ty::layout::HasTypingEnv; πŸ”’
use rustc_middle::ty::layout::TyAndLayout; πŸ”’
use rustc_middle::ty::layout::ValidityRequirement; πŸ”’
use rustc_middle::ty; πŸ”’
use rustc_middle::ty::FieldInfo; πŸ”’
use rustc_middle::ty::ScalarInt; πŸ”’
use rustc_middle::ty::Ty; πŸ”’
use rustc_middle::ty::TyCtxt; πŸ”’
use rustc_middle::mir; πŸ”’
use rustc_middle::throw_machine_stop; πŸ”’
use rustc_span::Span; πŸ”’
use rustc_span::Symbol; πŸ”’
use rustc_span::bug; πŸ”’
use rustc_span::span_bug; πŸ”’
use rustc_span::sym; πŸ”’
use rustc_target::callconv::FnAbi; πŸ”’
use tracing::debug; πŸ”’
use crate::diagnostics::LongRunning; πŸ”’
use crate::diagnostics::LongRunningWarn; πŸ”’
use crate::interpret; πŸ”’
use crate::interpret::AllocId; πŸ”’
use crate::interpret::AllocInit; πŸ”’
use crate::interpret::AllocRange; πŸ”’
use crate::interpret::ConstAllocation; πŸ”’
use crate::interpret::CtfeProvenance; πŸ”’
use crate::interpret::FnArg; πŸ”’
use crate::interpret::Frame; πŸ”’
use crate::interpret::GlobalAlloc; πŸ”’
use crate::interpret::ImmTy; πŸ”’
use crate::interpret::Immediate; πŸ”’
use crate::interpret::InterpCx; πŸ”’
use crate::interpret::InterpResult; πŸ”’
use crate::interpret::OpTy; πŸ”’
use crate::interpret::PlaceTy; πŸ”’
use crate::interpret::Pointer; πŸ”’
use crate::interpret::RangeSet; πŸ”’
use crate::interpret::RetagMode; πŸ”’
use crate::interpret::Scalar; πŸ”’
use crate::interpret::compile_time_machine; πŸ”’
use crate::interpret::ensure_monomorphic_enough; πŸ”’
use crate::interpret::err_inval; πŸ”’
use crate::interpret::interp_ok; πŸ”’
use crate::interpret::throw_exhaust; πŸ”’
use crate::interpret::throw_inval; πŸ”’
use crate::interpret::throw_ub; πŸ”’
use crate::interpret::throw_ub_format; πŸ”’
use crate::interpret::throw_unsup; πŸ”’
use crate::interpret::throw_unsup_format; πŸ”’
use crate::interpret::type_implements_dyn_trait; πŸ”’
use super::error::*; πŸ”’

StructsΒ§

CompileTimeMachine
Extra machine state for CTFE, and the Machine instance.

EnumsΒ§

CanAccessMutGlobal πŸ”’
CheckAlignment
MemoryKind

ConstantsΒ§

LINT_TERMINATOR_LIMIT πŸ”’
When hitting this many interpreted terminators we emit a deny by default lint that notfies the user that their constant takes a long time to evaluate. If that’s what they intended, they can just allow the lint.
PROGRESS_INDICATOR_START πŸ”’
After this many interpreted terminators, we start emitting progress indicators at every power of two of interpreted terminators.
TINY_LINT_TERMINATOR_LIMIT πŸ”’
The limit used by -Z tiny-const-eval-limit. This smaller limit is useful for internal tests not needing to run 30s or more to show some behaviour.

Type AliasesΒ§

CompileTimeInterpCx