@@ -393,10 +393,7 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
393393 None => tcx. types . unit ,
394394 Some ( field_def) => {
395395 let self_ty = field_def. ty ( tcx, args) ;
396- ecx. add_goal ( goal. with (
397- tcx,
398- ty:: Binder :: dummy ( goal. predicate . with_self_ty ( tcx, self_ty) ) ,
399- ) ) ;
396+ ecx. add_goal ( goal. with ( tcx, goal. predicate . with_self_ty ( tcx, self_ty) ) ) ;
400397 return ecx
401398 . evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes ) ;
402399 }
@@ -406,10 +403,7 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
406403 ty:: Tuple ( elements) => match elements. last ( ) {
407404 None => tcx. types . unit ,
408405 Some ( & self_ty) => {
409- ecx. add_goal ( goal. with (
410- tcx,
411- ty:: Binder :: dummy ( goal. predicate . with_self_ty ( tcx, self_ty) ) ,
412- ) ) ;
406+ ecx. add_goal ( goal. with ( tcx, goal. predicate . with_self_ty ( tcx, self_ty) ) ) ;
413407 return ecx
414408 . evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes ) ;
415409 }
@@ -450,10 +444,10 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
450444 Self :: consider_implied_clause (
451445 ecx,
452446 goal,
453- ty:: Binder :: dummy ( ty :: ProjectionPredicate {
447+ ty:: ProjectionPredicate {
454448 projection_ty : ecx. tcx ( ) . mk_alias_ty ( goal. predicate . def_id ( ) , [ self_ty] ) ,
455449 term,
456- } )
450+ }
457451 . to_predicate ( tcx) ,
458452 // Technically, we need to check that the future type is Sized,
459453 // but that's already proven by the generator being WF.
@@ -490,12 +484,12 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
490484 Self :: consider_implied_clause (
491485 ecx,
492486 goal,
493- ty:: Binder :: dummy ( ty :: ProjectionPredicate {
487+ ty:: ProjectionPredicate {
494488 projection_ty : ecx
495489 . tcx ( )
496490 . mk_alias_ty ( goal. predicate . def_id ( ) , [ self_ty, generator. resume_ty ( ) ] ) ,
497491 term,
498- } )
492+ }
499493 . to_predicate ( tcx) ,
500494 // Technically, we need to check that the future type is Sized,
501495 // but that's already proven by the generator being WF.
0 commit comments