@@ -18,7 +18,6 @@ use rustc_hir::def_id::{DefId, LocalDefId};
1818use rustc_middle:: infer:: canonical:: { Canonical , CanonicalVarValues } ;
1919use rustc_middle:: infer:: unify_key:: { ConstVarValue , ConstVariableValue } ;
2020use rustc_middle:: infer:: unify_key:: { ConstVariableOrigin , ConstVariableOriginKind , ToType } ;
21- use rustc_middle:: mir;
2221use rustc_middle:: mir:: interpret:: EvalToConstValueResult ;
2322use rustc_middle:: traits:: select;
2423use rustc_middle:: ty:: error:: { ExpectedFound , TypeError , UnconstrainedNumeric } ;
@@ -1499,9 +1498,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
14991498 pub fn const_eval_resolve (
15001499 & self ,
15011500 param_env : ty:: ParamEnv < ' tcx > ,
1502- def : ty:: WithOptConstParam < DefId > ,
1503- substs : SubstsRef < ' tcx > ,
1504- promoted : Option < mir:: Promoted > ,
1501+ ty:: Unevaluated { def, substs, promoted } : ty:: Unevaluated < ' tcx > ,
15051502 span : Option < Span > ,
15061503 ) -> EvalToConstValueResult < ' tcx > {
15071504 let mut original_values = OriginalQueryValues :: default ( ) ;
@@ -1510,7 +1507,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
15101507 let ( param_env, substs) = canonical. value ;
15111508 // The return value is the evaluated value which doesn't contain any reference to inference
15121509 // variables, thus we don't need to substitute back the original values.
1513- self . tcx . const_eval_resolve ( param_env, def, substs, promoted, span)
1510+ self . tcx . const_eval_resolve ( param_env, ty :: Unevaluated { def, substs, promoted } , span)
15141511 }
15151512
15161513 /// If `typ` is a type variable of some kind, resolve it one level
0 commit comments