Make select_* methods return Vec for TraitEngine
This commit is contained in:
parent
b3074819f6
commit
f1126f1272
25 changed files with 147 additions and 117 deletions
|
@ -1054,8 +1054,9 @@ fn check_return_ty_is_sync(tcx: TyCtxt<'tcx>, body: &Body<'tcx>, hir_id: HirId)
|
|||
let mut fulfillment_cx = traits::FulfillmentContext::new();
|
||||
let sync_def_id = tcx.require_lang_item(LangItem::Sync, Some(body.span));
|
||||
fulfillment_cx.register_bound(&infcx, ty::ParamEnv::empty(), ty, sync_def_id, cause);
|
||||
if let Err(err) = fulfillment_cx.select_all_or_error(&infcx) {
|
||||
infcx.report_fulfillment_errors(&err, None, false);
|
||||
let errors = fulfillment_cx.select_all_or_error(&infcx);
|
||||
if !errors.is_empty() {
|
||||
infcx.report_fulfillment_errors(&errors, None, false);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue