about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection/src/traits/codegen.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-12-06 13:27:45 +0100
committerGitHub <noreply@github.com>2022-12-06 13:27:45 +0100
commita9ffe7c738e4e9a9367726b591f3145c784391ed (patch)
tree07c892e607e39ad00b0420417dc7ec109c2e12ee /compiler/rustc_trait_selection/src/traits/codegen.rs
parent07fd8089a45cb917ae85eb06e33374db159332e3 (diff)
parentd2a80c157145d0c1e6fd6669862358de6cd89185 (diff)
Rollup merge of #105342 - compiler-errors:note_cause_code-takes-predicate, r=fee1-dead
Make `note_obligation_cause_code`  take a `impl ToPredicate` for predicate

The only usecase that wasn't `impl ToPredicate` was noting overflow errors while revealing opaque types, which passed in an `Obligation<'tcx, Ty<'tcx>>`... Since this only happens in a `RevealAll` environment, which is after typeck (and probably primarily within `normalize_erasing_regions`) we're unlikely to display anything useful while noting this code, evidenced by the lack of UI test changes.
Diffstat (limited to 'compiler/rustc_trait_selection/src/traits/codegen.rs')
-rw-r--r--compiler/rustc_trait_selection/src/traits/codegen.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/codegen.rs b/compiler/rustc_trait_selection/src/traits/codegen.rs
index 61743d78e9e..0102d268b42 100644
--- a/compiler/rustc_trait_selection/src/traits/codegen.rs
+++ b/compiler/rustc_trait_selection/src/traits/codegen.rs
@@ -70,7 +70,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.err_ctxt().report_overflow_error_cycle(&cycle);
+                infcx.err_ctxt().report_overflow_obligation_cycle(&cycle);
             }
         }
         return Err(CodegenObligationError::FulfillmentError);