@@ -320,22 +320,25 @@ fn impl_intersection_has_impossible_obligation<'a, 'cx, 'tcx>(
320
320
let mut errors = fulfill_cx. select_where_possible ( infcx) ;
321
321
errors. pop ( ) . map ( |err| err. obligation )
322
322
} else {
323
- obligations. iter ( ) . cloned ( ) . find ( |obligation| {
324
- // We use `evaluate_root_obligation` to correctly track intercrate
325
- // ambiguity clauses. We cannot use this in the new solver.
326
- let evaluation_result = selcx. evaluate_root_obligation ( obligation) ;
327
-
328
- match evaluation_result {
329
- Ok ( result) => !result. may_apply ( ) ,
330
- // If overflow occurs, we need to conservatively treat the goal as possibly holding,
331
- // since there can be instantiations of this goal that don't overflow and result in
332
- // success. This isn't much of a problem in the old solver, since we treat overflow
333
- // fatally (this still can be encountered: <https://github.com/rust-lang/rust/issues/105231>),
334
- // but in the new solver, this is very important for correctness, since overflow
335
- // *must* be treated as ambiguity for completeness.
336
- Err ( _overflow) => false ,
337
- }
338
- } )
323
+ obligations
324
+ . iter ( )
325
+ . find ( |obligation| {
326
+ // We use `evaluate_root_obligation` to correctly track intercrate
327
+ // ambiguity clauses. We cannot use this in the new solver.
328
+ let evaluation_result = selcx. evaluate_root_obligation ( obligation) ;
329
+
330
+ match evaluation_result {
331
+ Ok ( result) => !result. may_apply ( ) ,
332
+ // If overflow occurs, we need to conservatively treat the goal as possibly holding,
333
+ // since there can be instantiations of this goal that don't overflow and result in
334
+ // success. This isn't much of a problem in the old solver, since we treat overflow
335
+ // fatally (this still can be encountered: <https://github.com/rust-lang/rust/issues/105231>),
336
+ // but in the new solver, this is very important for correctness, since overflow
337
+ // *must* be treated as ambiguity for completeness.
338
+ Err ( _overflow) => false ,
339
+ }
340
+ } )
341
+ . cloned ( )
339
342
}
340
343
}
341
344
0 commit comments