X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_typeck%2Fsrc%2Fcheck%2Fcheck.rs;h=909fdf63f3ec0839364ee07837358d223c3417ae;hb=f1126f1272d21a5bee1694b5e9bb5f3cf19629d1;hp=5040c4db95163a48473aace18608b6d7a7d55623;hpb=37f70a0e1e04086aee7ae57fbefd6d4071953506;p=rust.git diff --git a/compiler/rustc_typeck/src/check/check.rs b/compiler/rustc_typeck/src/check/check.rs index 5040c4db951..909fdf63f3e 100644 --- a/compiler/rustc_typeck/src/check/check.rs +++ b/compiler/rustc_typeck/src/check/check.rs @@ -663,8 +663,9 @@ fn check_opaque_meets_bounds<'tcx>( // Check that all obligations are satisfied by the implementation's // version. - if let Err(ref errors) = inh.fulfillment_cx.borrow_mut().select_all_or_error(&infcx) { - infcx.report_fulfillment_errors(errors, None, false); + let errors = inh.fulfillment_cx.borrow_mut().select_all_or_error(&infcx); + if !errors.is_empty() { + infcx.report_fulfillment_errors(&errors, None, false); } // Finally, resolve all regions. This catches wily misuses of