Function rustc_const_eval::const_eval::eval_queries::mk_eval_cx
source · [−]pub(super) fn mk_eval_cx<'mir, 'tcx>(
tcx: TyCtxt<'tcx>,
root_span: Span,
param_env: ParamEnv<'tcx>,
can_access_statics: bool
) -> InterpCx<'mir, 'tcx, CompileTimeInterpreter<'mir, 'tcx>>
Expand description
The InterpCx
is only meant to be used to do field and index projections into constants for
simd_shuffle
and const patterns in match arms. It never performs alignment checks.
The function containing the match
that is currently being analyzed may have generic bounds
that inform us about the generic bounds of the constant. E.g., using an associated constant
of a function’s generic parameter will require knowledge about the bounds on the generic
parameter. These bounds are passed to mk_eval_cx
via the ParamEnv
argument.