Opt-in diagnostics reporting to avoid doing extra work in the new solver
This commit is contained in:
parent
ab45660c75
commit
e94779a396
@ -79,7 +79,7 @@ fn check_fn(
|
|||||||
let send_trait = cx.tcx.get_diagnostic_item(sym::Send).unwrap();
|
let send_trait = cx.tcx.get_diagnostic_item(sym::Send).unwrap();
|
||||||
let span = decl.output.span();
|
let span = decl.output.span();
|
||||||
let infcx = cx.tcx.infer_ctxt().build();
|
let infcx = cx.tcx.infer_ctxt().build();
|
||||||
let ocx = ObligationCtxt::new(&infcx);
|
let ocx = ObligationCtxt::new_with_diagnostics(&infcx);
|
||||||
let cause = traits::ObligationCause::misc(span, fn_def_id);
|
let cause = traits::ObligationCause::misc(span, fn_def_id);
|
||||||
ocx.register_bound(cause, cx.param_env, ret_ty, send_trait);
|
ocx.register_bound(cause, cx.param_env, ret_ty, send_trait);
|
||||||
let send_errors = ocx.select_all_or_error();
|
let send_errors = ocx.select_all_or_error();
|
||||||
|
Loading…
Reference in New Issue
Block a user