@@ -21,8 +21,8 @@ use crate::solve::{AdtDestructorKind, EvalCtxt, Goal, NoSolution};
2121#[ instrument( level = "trace" , skip( ecx) , ret) ]
2222pub ( in crate :: solve) fn instantiate_constituent_tys_for_auto_trait < D , I > (
2323 ecx : & EvalCtxt < ' _ , D > ,
24- ty : I :: Ty ,
25- ) -> Result < ty:: Binder < I , Vec < I :: Ty > > , NoSolution >
24+ ty : ty :: Ty < I > ,
25+ ) -> Result < ty:: Binder < I , Vec < ty :: Ty < I > > > , NoSolution >
2626where
2727 D : SolverDelegate < Interner = I > ,
2828 I : Interner ,
@@ -108,8 +108,8 @@ where
108108pub ( in crate :: solve) fn instantiate_constituent_tys_for_sizedness_trait < D , I > (
109109 ecx : & EvalCtxt < ' _ , D > ,
110110 sizedness : SizedTraitKind ,
111- ty : I :: Ty ,
112- ) -> Result < ty:: Binder < I , Vec < I :: Ty > > , NoSolution >
111+ ty : ty :: Ty < I > ,
112+ ) -> Result < ty:: Binder < I , Vec < ty :: Ty < I > > > , NoSolution >
113113where
114114 D : SolverDelegate < Interner = I > ,
115115 I : Interner ,
@@ -186,8 +186,8 @@ where
186186#[ instrument( level = "trace" , skip( ecx) , ret) ]
187187pub ( in crate :: solve) fn instantiate_constituent_tys_for_copy_clone_trait < D , I > (
188188 ecx : & EvalCtxt < ' _ , D > ,
189- ty : I :: Ty ,
190- ) -> Result < ty:: Binder < I , Vec < I :: Ty > > , NoSolution >
189+ ty : ty :: Ty < I > ,
190+ ) -> Result < ty:: Binder < I , Vec < ty :: Ty < I > > > , NoSolution >
191191where
192192 D : SolverDelegate < Interner = I > ,
193193 I : Interner ,
@@ -268,9 +268,9 @@ where
268268// Returns a binder of the tupled inputs types and output type from a builtin callable type.
269269pub ( in crate :: solve) fn extract_tupled_inputs_and_output_from_callable < I : Interner > (
270270 cx : I ,
271- self_ty : I :: Ty ,
271+ self_ty : ty :: Ty < I > ,
272272 goal_kind : ty:: ClosureKind ,
273- ) -> Result < Option < ty:: Binder < I , ( I :: Ty , I :: Ty ) > > , NoSolution > {
273+ ) -> Result < Option < ty:: Binder < I , ( ty :: Ty < I > , ty :: Ty < I > ) > > , NoSolution > {
274274 match self_ty. kind ( ) {
275275 // keep this in sync with assemble_fn_pointer_candidates until the old solver is removed.
276276 ty:: FnDef ( def_id, args) => {
@@ -408,13 +408,13 @@ pub(in crate::solve) fn extract_tupled_inputs_and_output_from_callable<I: Intern
408408#[ derive_where( Clone , Copy , Debug ; I : Interner ) ]
409409#[ derive( TypeVisitable_Generic , TypeFoldable_Generic ) ]
410410pub ( in crate :: solve) struct AsyncCallableRelevantTypes < I : Interner > {
411- pub tupled_inputs_ty : I :: Ty ,
411+ pub tupled_inputs_ty : ty :: Ty < I > ,
412412 /// Type returned by calling the closure
413413 /// i.e. `f()`.
414- pub output_coroutine_ty : I :: Ty ,
414+ pub output_coroutine_ty : ty :: Ty < I > ,
415415 /// Type returned by `await`ing the output
416416 /// i.e. `f().await`.
417- pub coroutine_return_ty : I :: Ty ,
417+ pub coroutine_return_ty : ty :: Ty < I > ,
418418}
419419
420420// Returns a binder of the tupled inputs types, output type, and coroutine type
@@ -424,7 +424,7 @@ pub(in crate::solve) struct AsyncCallableRelevantTypes<I: Interner> {
424424// know the kind already, we can short-circuit this check.
425425pub ( in crate :: solve) fn extract_tupled_inputs_and_output_from_async_callable < I : Interner > (
426426 cx : I ,
427- self_ty : I :: Ty ,
427+ self_ty : ty :: Ty < I > ,
428428 goal_kind : ty:: ClosureKind ,
429429 env_region : I :: Region ,
430430) -> Result < ( ty:: Binder < I , AsyncCallableRelevantTypes < I > > , Vec < I :: Predicate > ) , NoSolution > {
@@ -608,7 +608,7 @@ fn coroutine_closure_to_certain_coroutine<I: Interner>(
608608 def_id : I :: CoroutineClosureId ,
609609 args : ty:: CoroutineClosureArgs < I > ,
610610 sig : ty:: CoroutineClosureSignature < I > ,
611- ) -> I :: Ty {
611+ ) -> ty :: Ty < I > {
612612 sig. to_coroutine_given_kind_and_upvars (
613613 cx,
614614 args. parent_args ( ) ,
@@ -632,7 +632,7 @@ fn coroutine_closure_to_ambiguous_coroutine<I: Interner>(
632632 def_id : I :: CoroutineClosureId ,
633633 args : ty:: CoroutineClosureArgs < I > ,
634634 sig : ty:: CoroutineClosureSignature < I > ,
635- ) -> I :: Ty {
635+ ) -> ty :: Ty < I > {
636636 let upvars_projection_def_id = cx. require_lang_item ( SolverLangItem :: AsyncFnKindUpvars ) ;
637637 let tupled_upvars_ty = Ty :: new_projection (
638638 cx,
@@ -664,8 +664,8 @@ fn coroutine_closure_to_ambiguous_coroutine<I: Interner>(
664664#[ instrument( level = "trace" , skip( cx) , ret) ]
665665pub ( in crate :: solve) fn extract_fn_def_from_const_callable < I : Interner > (
666666 cx : I ,
667- self_ty : I :: Ty ,
668- ) -> Result < ( ty:: Binder < I , ( I :: Ty , I :: Ty ) > , I :: DefId , I :: GenericArgs ) , NoSolution > {
667+ self_ty : ty :: Ty < I > ,
668+ ) -> Result < ( ty:: Binder < I , ( ty :: Ty < I > , ty :: Ty < I > ) > , I :: DefId , I :: GenericArgs ) , NoSolution > {
669669 match self_ty. kind ( ) {
670670 ty:: FnDef ( def_id, args) => {
671671 let sig = cx. fn_sig ( def_id) ;
@@ -742,7 +742,7 @@ pub(in crate::solve) fn extract_fn_def_from_const_callable<I: Interner>(
742742// the old solver, for as long as that exists.
743743pub ( in crate :: solve) fn const_conditions_for_destruct < I : Interner > (
744744 cx : I ,
745- self_ty : I :: Ty ,
745+ self_ty : ty :: Ty < I > ,
746746) -> Result < Vec < ty:: TraitRef < I > > , NoSolution > {
747747 let destruct_def_id = cx. require_trait_lang_item ( SolverTraitLangItem :: Destruct ) ;
748748
@@ -923,7 +923,7 @@ where
923923struct ReplaceProjectionWith < ' a , ' b , I : Interner , D : SolverDelegate < Interner = I > > {
924924 ecx : & ' a mut EvalCtxt < ' b , D > ,
925925 param_env : I :: ParamEnv ,
926- self_ty : I :: Ty ,
926+ self_ty : ty :: Ty < I > ,
927927 mapping : & ' a HashMap < I :: DefId , Vec < ty:: Binder < I , ty:: ProjectionPredicate < I > > > > ,
928928 nested : Vec < Goal < I , I :: Predicate > > ,
929929}
@@ -1009,7 +1009,7 @@ where
10091009 self . ecx . cx ( )
10101010 }
10111011
1012- fn try_fold_ty ( & mut self , ty : I :: Ty ) -> Result < I :: Ty , Ambiguous > {
1012+ fn try_fold_ty ( & mut self , ty : ty :: Ty < I > ) -> Result < ty :: Ty < I > , Ambiguous > {
10131013 if let ty:: Alias ( ty:: Projection , alias_ty) = ty. kind ( )
10141014 && let Some ( term) = self . try_eagerly_replace_alias ( alias_ty. into ( ) ) ?
10151015 {
0 commit comments