@@ -29,7 +29,7 @@ use std::ops::ControlFlow;
2929/// Check if a given constant can be evaluated.
3030pub fn is_const_evaluatable < ' cx , ' tcx > (
3131 infcx : & InferCtxt < ' cx , ' tcx > ,
32- uv : ty:: Unevaluated < ' tcx > ,
32+ uv : ty:: Unevaluated < ' tcx , ( ) > ,
3333 param_env : ty:: ParamEnv < ' tcx > ,
3434 span : Span ,
3535) -> Result < ( ) , NotConstEvaluatable > {
@@ -149,7 +149,7 @@ pub fn is_const_evaluatable<'cx, 'tcx>(
149149 // and hopefully soon change this to an error.
150150 //
151151 // See #74595 for more details about this.
152- let concrete = infcx. const_eval_resolve ( param_env, uv, Some ( span) ) ;
152+ let concrete = infcx. const_eval_resolve ( param_env, uv. expand ( ) , Some ( span) ) ;
153153
154154 if concrete. is_ok ( ) && uv. substs ( infcx. tcx ) . has_param_types_or_consts ( infcx. tcx ) {
155155 match infcx. tcx . def_kind ( uv. def . did ) {
@@ -194,7 +194,7 @@ pub struct AbstractConst<'tcx> {
194194impl < ' tcx > AbstractConst < ' tcx > {
195195 pub fn new (
196196 tcx : TyCtxt < ' tcx > ,
197- uv : ty:: Unevaluated < ' tcx > ,
197+ uv : ty:: Unevaluated < ' tcx , ( ) > ,
198198 ) -> Result < Option < AbstractConst < ' tcx > > , ErrorReported > {
199199 let inner = tcx. mir_abstract_const_opt_const_arg ( uv. def ) ?;
200200 debug ! ( "AbstractConst::new({:?}) = {:?}" , uv, inner) ;
@@ -206,7 +206,7 @@ impl<'tcx> AbstractConst<'tcx> {
206206 ct : & ty:: Const < ' tcx > ,
207207 ) -> Result < Option < AbstractConst < ' tcx > > , ErrorReported > {
208208 match ct. val {
209- ty:: ConstKind :: Unevaluated ( uv) => AbstractConst :: new ( tcx, uv) ,
209+ ty:: ConstKind :: Unevaluated ( uv) => AbstractConst :: new ( tcx, uv. shrink ( ) ) ,
210210 ty:: ConstKind :: Error ( _) => Err ( ErrorReported ) ,
211211 _ => Ok ( None ) ,
212212 }
@@ -556,7 +556,7 @@ pub(super) fn mir_abstract_const<'tcx>(
556556
557557pub ( super ) fn try_unify_abstract_consts < ' tcx > (
558558 tcx : TyCtxt < ' tcx > ,
559- ( a, b) : ( ty:: Unevaluated < ' tcx > , ty:: Unevaluated < ' tcx > ) ,
559+ ( a, b) : ( ty:: Unevaluated < ' tcx , ( ) > , ty:: Unevaluated < ' tcx , ( ) > ) ,
560560) -> bool {
561561 ( || {
562562 if let Some ( a) = AbstractConst :: new ( tcx, a) ? {
0 commit comments