about summary refs log tree commit diff
path: root/compiler/rustc_const_eval/src
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-06-09 13:55:34 +0200
committerGitHub <noreply@github.com>2025-06-09 13:55:34 +0200
commit7ab938375dc8a3ee7dbe8de0ce1ee83f59710dc8 (patch)
tree399d0ce64e8e7ee7eecd7fcf9b0964cb00305369 /compiler/rustc_const_eval/src
parent9188dd79328a369cf7ecaf3d428e83da9a8870d4 (diff)
parentd2afab4d60d393bcaead85b051a33b8fddeaf5a6 (diff)
downloadrust-7ab938375dc8a3ee7dbe8de0ce1ee83f59710dc8.tar.gz
rust-7ab938375dc8a3ee7dbe8de0ce1ee83f59710dc8.zip
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
Diffstat (limited to 'compiler/rustc_const_eval/src')
-rw-r--r--compiler/rustc_const_eval/src/check_consts/check.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_const_eval/src/check_consts/check.rs b/compiler/rustc_const_eval/src/check_consts/check.rs
index 6167f8cd4b5..9719d405259 100644
--- a/compiler/rustc_const_eval/src/check_consts/check.rs
+++ b/compiler/rustc_const_eval/src/check_consts/check.rs
@@ -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() {