Skip to content

Commit 32434e1

Browse files
authored
Unrolled build for #142222
Rollup merge of #142222 - compiler-errors:ocx-w-no-diag, r=lcnr Dont make `ObligationCtxt`s with diagnostics unnecessarily just a nit, shouldn't affect perf b/c `ObligationCtxt::new_with_diagnostics` should only be more expensive in the new trait solver, and I don't expect either of these to encounter errors today anyways. r? oli-obk
2 parents 7c10378 + d2afab4 commit 32434e1

File tree

2 files changed

+2
-2
lines changed
  • compiler

2 files changed

+2
-2
lines changed

compiler/rustc_const_eval/src/check_consts/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ impl<'mir, 'tcx> Checker<'mir, 'tcx> {
395395
}
396396

397397
let (infcx, param_env) = tcx.infer_ctxt().build_with_typing_env(self.body.typing_env(tcx));
398-
let ocx = ObligationCtxt::new_with_diagnostics(&infcx);
398+
let ocx = ObligationCtxt::new(&infcx);
399399

400400
let body_id = self.body.source.def_id().expect_local();
401401
let host_polarity = match self.const_kind() {

compiler/rustc_ty_utils/src/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ fn impl_self_is_guaranteed_unsized<'tcx>(tcx: TyCtxt<'tcx>, impl_def_id: DefId)
319319

320320
let infcx = tcx.infer_ctxt().ignoring_regions().build(ty::TypingMode::non_body_analysis());
321321

322-
let ocx = traits::ObligationCtxt::new_with_diagnostics(&infcx);
322+
let ocx = traits::ObligationCtxt::new(&infcx);
323323
let cause = traits::ObligationCause::dummy();
324324
let param_env = tcx.param_env(impl_def_id);
325325

0 commit comments

Comments
 (0)