about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/codegen.rs
diff options
context:
space:
mode:
authorCameron Steffen <cam.steffen94@gmail.com>2022-09-09 15:08:06 -0500
committerCameron Steffen <cam.steffen94@gmail.com>2022-10-07 07:06:16 -0500
commit4a68373217e610e2e6768bae27c6b15e0377faad (patch)
tree166a47334b30099ffdd126726a1d4839680c0688 /compiler/rustc_trait_selection/src/traits/codegen.rs
parent58546803885164d488185fb9cb9fb04fcbe64e30 (diff)
downloadrust-4a68373217e610e2e6768bae27c6b15e0377faad.tar.gz
rust-4a68373217e610e2e6768bae27c6b15e0377faad.zip
Introduce TypeErrCtxt
TypeErrCtxt optionally has a TypeckResults so that InferCtxt doesn't
need to.
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/codegen.rs')
-rw-r--r--compiler/rustc_trait_selection/src/traits/codegen.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/codegen.rs b/compiler/rustc_trait_selection/src/traits/codegen.rs
index 0155798c8b6..dde7527302c 100644
--- a/compiler/rustc_trait_selection/src/traits/codegen.rs
+++ b/compiler/rustc_trait_selection/src/traits/codegen.rs
@@ -4,7 +4,7 @@
 // general routines.
 
 use crate::infer::{DefiningAnchor, TyCtxtInferExt};
-use crate::traits::error_reporting::InferCtxtExt;
+use crate::traits::error_reporting::TypeErrCtxtExt;
 use crate::traits::{
     ImplSource, Obligation, ObligationCause, SelectionContext, TraitEngine, TraitEngineExt,
     Unimplemented,
@@ -69,7 +69,7 @@ pub fn codegen_select_candidate<'tcx>(
             // `rustc_ty_utils::resolve_associated_item` doesn't return `None` post-monomorphization.
             for err in errors {
                 if let FulfillmentErrorCode::CodeCycle(cycle) = err.code {
-                    infcx.report_overflow_error_cycle(&cycle);
+                    infcx.err_ctxt().report_overflow_error_cycle(&cycle);
                 }
             }
             return Err(CodegenObligationError::FulfillmentError);