@@ -10,8 +10,8 @@ use rustc_type_ir::inherent::*;
1010use rustc_type_ir:: lang_items:: TraitSolverLangItem ;
1111use rustc_type_ir:: solve:: SizedTraitKind ;
1212use rustc_type_ir:: {
13- self as ty, Interner , TypeFoldable , TypeSuperVisitable , TypeVisitable , TypeVisitableExt as _ ,
14- TypeVisitor , TypingMode , Upcast as _, elaborate,
13+ self as ty, Interner , TypeFlags , TypeFoldable , TypeSuperVisitable , TypeVisitable ,
14+ TypeVisitableExt as _ , TypeVisitor , TypingMode , Upcast as _, elaborate,
1515} ;
1616use tracing:: { debug, instrument} ;
1717
@@ -132,6 +132,7 @@ where
132132 } )
133133 . enter ( |ecx| {
134134 Self :: match_assumption ( ecx, goal, assumption, |ecx| {
135+ ecx. try_evaluate_added_goals ( ) ?;
135136 source. set ( ecx. characterize_param_env_assumption ( goal. param_env , assumption) ?) ;
136137 ecx. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes )
137138 } )
@@ -1069,8 +1070,10 @@ where
10691070 } else {
10701071 ControlFlow :: Continue ( ( ) )
10711072 }
1072- } else {
1073+ } else if ty . has_type_flags ( TypeFlags :: HAS_PLACEHOLDER | TypeFlags :: HAS_RE_INFER ) {
10731074 ty. super_visit_with ( self )
1075+ } else {
1076+ ControlFlow :: Continue ( ( ) )
10741077 }
10751078 }
10761079
@@ -1086,8 +1089,10 @@ where
10861089 } else {
10871090 ControlFlow :: Continue ( ( ) )
10881091 }
1089- } else {
1092+ } else if ct . has_type_flags ( TypeFlags :: HAS_PLACEHOLDER | TypeFlags :: HAS_RE_INFER ) {
10901093 ct. super_visit_with ( self )
1094+ } else {
1095+ ControlFlow :: Continue ( ( ) )
10911096 }
10921097 }
10931098
0 commit comments