@@ -10,8 +10,8 @@ use rustc_type_ir::inherent::*;
10
10
use rustc_type_ir:: lang_items:: TraitSolverLangItem ;
11
11
use rustc_type_ir:: solve:: SizedTraitKind ;
12
12
use 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,
15
15
} ;
16
16
use tracing:: { debug, instrument} ;
17
17
@@ -132,6 +132,7 @@ where
132
132
} )
133
133
. enter ( |ecx| {
134
134
Self :: match_assumption ( ecx, goal, assumption, |ecx| {
135
+ ecx. try_evaluate_added_goals ( ) ?;
135
136
source. set ( ecx. characterize_param_env_assumption ( goal. param_env , assumption) ?) ;
136
137
ecx. evaluate_added_goals_and_make_canonical_response ( Certainty :: Yes )
137
138
} )
@@ -1069,8 +1070,10 @@ where
1069
1070
} else {
1070
1071
ControlFlow :: Continue ( ( ) )
1071
1072
}
1072
- } else {
1073
+ } else if ty . has_type_flags ( TypeFlags :: HAS_PLACEHOLDER | TypeFlags :: HAS_RE_INFER ) {
1073
1074
ty. super_visit_with ( self )
1075
+ } else {
1076
+ ControlFlow :: Continue ( ( ) )
1074
1077
}
1075
1078
}
1076
1079
@@ -1086,8 +1089,10 @@ where
1086
1089
} else {
1087
1090
ControlFlow :: Continue ( ( ) )
1088
1091
}
1089
- } else {
1092
+ } else if ct . has_type_flags ( TypeFlags :: HAS_PLACEHOLDER | TypeFlags :: HAS_RE_INFER ) {
1090
1093
ct. super_visit_with ( self )
1094
+ } else {
1095
+ ControlFlow :: Continue ( ( ) )
1091
1096
}
1092
1097
}
1093
1098
0 commit comments