File tree Expand file tree Collapse file tree 1 file changed +7
-14
lines changed
compiler/rustc_trait_selection/src/solve Expand file tree Collapse file tree 1 file changed +7
-14
lines changed Original file line number Diff line number Diff line change @@ -586,20 +586,13 @@ impl<'tcx> assembly::GoalKind<'tcx> for ProjectionPredicate<'tcx> {
586586 ecx : & mut EvalCtxt < ' _ , ' tcx > ,
587587 goal : Goal < ' tcx , Self > ,
588588 ) -> QueryResult < ' tcx > {
589- let self_ty = goal. predicate . self_ty ( ) ;
590-
591- let tcx = ecx. tcx ( ) ;
592- let term = self_ty. discriminant_ty ( tcx) . into ( ) ;
593-
594- Self :: consider_assumption (
595- ecx,
596- goal,
597- ty:: Binder :: dummy ( ty:: ProjectionPredicate {
598- projection_ty : tcx. mk_alias_ty ( goal. predicate . def_id ( ) , [ self_ty] ) ,
599- term,
600- } )
601- . to_predicate ( tcx) ,
602- )
589+ let discriminant = goal. predicate . self_ty ( ) . discriminant_ty ( ecx. tcx ( ) ) ;
590+ let nested_goals = ecx. infcx . eq (
591+ goal. param_env ,
592+ goal. predicate . term . ty ( ) . expect ( "expected ty goal" ) ,
593+ discriminant,
594+ ) ?;
595+ ecx. evaluate_all_and_make_canonical_response ( nested_goals)
603596 }
604597}
605598
You can’t perform that action at this time.
0 commit comments