pub(crate) fn mk_eval_cx_to_read_const_val<'mir, 'tcx>(
    tcx: TyCtxt<'tcx>,
    root_span: Span,
    param_env: ParamEnv<'tcx>,
    can_access_mut_global: CanAccessMutGlobal
) -> 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.

This should not be used to do any actual interpretation. In particular, alignment checks are turned off!

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.