about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/check/entry.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-06-01 14:51:31 -0400
committerMichael Goulet <michael@errs.io>2024-06-03 09:27:52 -0400
commiteb0a70a5578be0ae164cb802898ea98d41e95f13 (patch)
tree46f44c5a9e7c8a39a83a365d20612b30cede5b47 /compiler/rustc_hir_analysis/src/check/entry.rs
parent54b2b7d460fd0847508b781219d380231c4fee72 (diff)
downloadrust-eb0a70a5578be0ae164cb802898ea98d41e95f13.tar.gz
rust-eb0a70a5578be0ae164cb802898ea98d41e95f13.zip
Opt-in diagnostics reporting to avoid doing extra work in the new solver
Diffstat (limited to 'compiler/rustc_hir_analysis/src/check/entry.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/check/entry.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/entry.rs b/compiler/rustc_hir_analysis/src/check/entry.rs
index 25ac31c16c7..cc52a765802 100644
--- a/compiler/rustc_hir_analysis/src/check/entry.rs
+++ b/compiler/rustc_hir_analysis/src/check/entry.rs
@@ -133,7 +133,7 @@ fn check_main_fn_ty(tcx: TyCtxt<'_>, main_def_id: DefId) {
             main_diagnostics_def_id,
             ObligationCauseCode::MainFunctionType,
         );
-        let ocx = traits::ObligationCtxt::new(&infcx);
+        let ocx = traits::ObligationCtxt::new_with_diagnostics(&infcx);
         let norm_return_ty = ocx.normalize(&cause, param_env, return_ty);
         ocx.register_bound(cause, param_env, norm_return_ty, term_did);
         let errors = ocx.select_all_or_error();