File tree 1 file changed +5
-3
lines changed
compiler/rustc_trait_selection/src/traits
1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -155,10 +155,12 @@ fn pred_known_to_hold_modulo_regions<'tcx>(
155
155
predicate : pred. to_predicate ( infcx. tcx ) ,
156
156
} ;
157
157
158
- let result = infcx. predicate_must_hold_modulo_regions ( & obligation) ;
158
+ let result = infcx. evaluate_obligation_no_overflow ( & obligation) ;
159
159
debug ! ( ?result) ;
160
160
161
- if result && has_non_region_infer {
161
+ if result. must_apply_modulo_regions ( ) && !has_non_region_infer {
162
+ true
163
+ } else if result. may_apply ( ) {
162
164
// Because of inference "guessing", selection can sometimes claim
163
165
// to succeed while the success requires a guess. To ensure
164
166
// this function's result remains infallible, we must confirm
@@ -179,7 +181,7 @@ fn pred_known_to_hold_modulo_regions<'tcx>(
179
181
}
180
182
}
181
183
} else {
182
- result
184
+ false
183
185
}
184
186
}
185
187
You can’t perform that action at this time.
0 commit comments