Function rustc_const_eval::eval_const_expr_partial
[−]
[src]
pub fn eval_const_expr_partial<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, e: &Expr, ty_hint: EvalHint<'tcx>, fn_args: FnArgMap) -> EvalResult
Unstable (
rustc_private
)Evaluate a constant expression in a context where the expression isn't
guaranteed to be evaluatable. ty_hint
is usually ExprTypeChecked,
but a few places need to evaluate constants during type-checking, like
computing the length of an array. (See also the FIXME above EvalHint.)