Dont make ObligationCtxts with diagnostics unnecessarily
This commit is contained in:
@@ -395,7 +395,7 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
|
||||
}
|
||||
|
||||
let (infcx, param_env) = tcx.infer_ctxt().build_with_typing_env(self.body.typing_env(tcx));
|
||||
let ocx = ObligationCtxt::new_with_diagnostics(&infcx);
|
||||
let ocx = ObligationCtxt::new(&infcx);
|
||||
|
||||
let body_id = self.body.source.def_id().expect_local();
|
||||
let host_polarity = match self.const_kind() {
|
||||
|
||||
@@ -319,7 +319,7 @@ fn impl_self_is_guaranteed_unsized<'tcx>(tcx: TyCtxt<'tcx>, impl_def_id: DefId)
|
||||
|
||||
let infcx = tcx.infer_ctxt().ignoring_regions().build(ty::TypingMode::non_body_analysis());
|
||||
|
||||
let ocx = traits::ObligationCtxt::new_with_diagnostics(&infcx);
|
||||
let ocx = traits::ObligationCtxt::new(&infcx);
|
||||
let cause = traits::ObligationCause::dummy();
|
||||
let param_env = tcx.param_env(impl_def_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user