about summary refs log tree commit diff
path: root/compiler/rustc_traits/src/codegen.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_traits/src/codegen.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_traits/src/codegen.rs')
-rw-r--r--compiler/rustc_traits/src/codegen.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_traits/src/codegen.rs b/compiler/rustc_traits/src/codegen.rs
index b96b1b67a74..41f607fb3a8 100644
--- a/compiler/rustc_traits/src/codegen.rs
+++ b/compiler/rustc_traits/src/codegen.rs
@@ -50,7 +50,8 @@ pub fn codegen_select_candidate<'tcx>(
     // Currently, we use a fulfillment context to completely resolve
     // all nested obligations. This is because they can inform the
     // inference of the impl's type parameters.
-    let ocx = ObligationCtxt::new(&infcx);
+    // FIXME(-Znext-solver): Doesn't need diagnostics if new solver.
+    let ocx = ObligationCtxt::new_with_diagnostics(&infcx);
     let impl_source = selection.map(|obligation| {
         ocx.register_obligation(obligation);
     });