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

@@ -556,7 +556,12 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
debug!(?c1, ?c2, "evaluate_predicate_recursively: equating consts");
let evaluate = |c: &'tcx ty::Const<'tcx>| {
if let ty::ConstKind::Unevaluated(def, substs, promoted) = c.val {
if let ty::ConstKind::Unevaluated(ty::Unevaluated {
def,
substs,
promoted,
}) = c.val
{
self.infcx
.const_eval_resolve(
obligation.param_env,