@@ -18,7 +18,6 @@ use rustc_hir::def_id::{DefId, LocalDefId};
18
18
use rustc_middle:: infer:: canonical:: { Canonical , CanonicalVarValues } ;
19
19
use rustc_middle:: infer:: unify_key:: { ConstVarValue , ConstVariableValue } ;
20
20
use rustc_middle:: infer:: unify_key:: { ConstVariableOrigin , ConstVariableOriginKind , ToType } ;
21
- use rustc_middle:: mir;
22
21
use rustc_middle:: mir:: interpret:: EvalToConstValueResult ;
23
22
use rustc_middle:: traits:: select;
24
23
use rustc_middle:: ty:: error:: { ExpectedFound , TypeError , UnconstrainedNumeric } ;
@@ -1499,9 +1498,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
1499
1498
pub fn const_eval_resolve (
1500
1499
& self ,
1501
1500
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 > ,
1505
1502
span : Option < Span > ,
1506
1503
) -> EvalToConstValueResult < ' tcx > {
1507
1504
let mut original_values = OriginalQueryValues :: default ( ) ;
@@ -1510,7 +1507,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
1510
1507
let ( param_env, substs) = canonical. value ;
1511
1508
// The return value is the evaluated value which doesn't contain any reference to inference
1512
1509
// 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)
1514
1511
}
1515
1512
1516
1513
/// If `typ` is a type variable of some kind, resolve it one level
0 commit comments