extract ConstKind::Unevaluated into a struct

This commit is contained in:
lcnr 2021-03-12 00:01:34 +01:00
parent 41b315a470
commit 43ebac119b
25 changed files with 131 additions and 88 deletions

View file

@ -30,7 +30,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> {
mir::ConstantKind::Val(val, _) => return Ok(val),
};
match ct.val {
ty::ConstKind::Unevaluated(def, substs, promoted) => self
ty::ConstKind::Unevaluated(ty::Unevaluated { def, substs, promoted }) => self
.cx
.tcx()
.const_eval_resolve(ty::ParamEnv::reveal_all(), def, substs, promoted, None)