Opt-in diagnostics reporting to avoid doing extra work in the new solver
This commit is contained in:
parent
54b2b7d460
commit
eb0a70a557
31 changed files with 200 additions and 107 deletions
|
@ -2321,7 +2321,7 @@ impl<'tcx> CheckAttrVisitor<'tcx> {
|
|||
let param_env = ty::ParamEnv::empty();
|
||||
|
||||
let infcx = tcx.infer_ctxt().build();
|
||||
let ocx = ObligationCtxt::new(&infcx);
|
||||
let ocx = ObligationCtxt::new_with_diagnostics(&infcx);
|
||||
|
||||
let span = tcx.def_span(def_id);
|
||||
let fresh_args = infcx.fresh_args_for_item(span, def_id.to_def_id());
|
||||
|
|
|
@ -54,7 +54,7 @@ pub fn ensure_wf<'tcx>(
|
|||
pred,
|
||||
);
|
||||
let infcx = tcx.infer_ctxt().build();
|
||||
let ocx = traits::ObligationCtxt::new(&infcx);
|
||||
let ocx = traits::ObligationCtxt::new_with_diagnostics(&infcx);
|
||||
ocx.register_obligation(obligation);
|
||||
let errors = ocx.select_all_or_error();
|
||||
if !errors.is_empty() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue