Re-exportsΒ§
use rustc_abi::FieldIdx;πuse rustc_abi::VariantIdx;πuse rustc_middle::mir;πuse rustc_middle::ty;πuse rustc_middle::ty::Ty;πuse rustc_middle::ty::TyCtxt;πuse rustc_span::DUMMY_SP;πuse rustc_span::bug;πuse tracing::instrument;πuse tracing::instrument;πuse crate::interpret::InterpCx;πpub(crate) use self::valtrees::eval_to_valtree;πpub(crate) use self::valtrees::valtree_to_const_value;π
ModulesΒ§
- dummy_
machine π - dyn_
trait π - error π
- eval_
queries π - fn_
queries π - machine π
- type_
info π - valtrees π
MacrosΒ§
- throw_
machine_ stop_ str - Macro for machine-specific
InterpErrorwithout allocation. (These will never be shown to the user, but they help diagnose ICEs.)
StructsΒ§
- Compile
Time Machine - Extra machine state for CTFE, and the Machine instance.
- Dummy
Machine
EnumsΒ§
- CanAccess
MutGlobal - Check
Alignment - Const
Eval ErrKind - The CTFE machine has some custom error kinds.
- Memory
Kind
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. - VALTREE_
MAX_ πNODES
TraitsΒ§
FunctionsΒ§
- const_
validate_ mplace - constness
- Checks whether a function-like definition is considered to be
const. Also stores constness of inherent impls. - eval_
body_ using_ ecx - eval_
in_ interpreter - eval_
static_ initializer_ provider - eval_
to_ allocation_ raw_ provider - eval_
to_ const_ value_ raw_ provider - eval_
trivial_ const_ using_ ecx - get_
span_ and_ frames - intern_
and_ validate - is_
promotable_ const_ fn - lint
- Emit a lint from a const-eval situation, with a backtrace.
- mk_
eval_ cx_ for_ const_ val - Create an interpreter context to inspect the given
ConstValue. Returns both the context and anOpTythat represents the constant. - mk_
eval_ cx_ to_ read_ const_ val - The
InterpCxis only meant to be used to do field and index projections into constants forsimd_shuffleand const patterns in match arms. - op_
to_ const - This function converts an interpreter value into a MIR constant.
- provide
- report
- Create a diagnostic for a const eval error.
- report_
eval_ error - report_
validation_ error - retry_
codegen_ mode_ with_ postanalysis - setup_
for_ eval - tag_
for_ variant_ provider - Computes the tag (if any) for a given type and variant.
- try_
destructure_ πmir_ constant_ for_ user_ output - turn_
into_ const_ value