update const_eval_resolve

This commit is contained in:
lcnr
2021-03-13 16:31:38 +01:00
parent 43ebac119b
commit 7c9b5b4ce0
13 changed files with 45 additions and 55 deletions

View File

@@ -163,7 +163,11 @@ pub fn is_const_evaluatable<'cx, 'tcx>(
// and hopefully soon change this to an error.
//
// See #74595 for more details about this.
let concrete = infcx.const_eval_resolve(param_env, def, substs, None, Some(span));
let concrete = infcx.const_eval_resolve(
param_env,
ty::Unevaluated { def, substs, promoted: None },
Some(span),
);
if concrete.is_ok() && substs.has_param_types_or_consts() {
match infcx.tcx.def_kind(def.did) {