about summary refs log tree commit diff
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-09-13 19:39:05 +0000
committerbors <bors@rust-lang.org>2025-09-13 19:39:05 +0000
commit02c7b1a7ac1d739663878030510508372e46f254 (patch)
tree6562d510c56941b71488d7e2283ed540602e4e81
parent637b50be01093962ac6f4432d6881ab41d6d90b4 (diff)
parent365189ef4f508e4645de7607052884b8e7f413a3 (diff)
downloadrust-02c7b1a7ac1d739663878030510508372e46f254.tar.gz
rust-02c7b1a7ac1d739663878030510508372e46f254.zip
Auto merge of #146491 - jdonszelmann:update-fixme-compare_method_predicate_entailment, r=lcnr
update fixme in compare_method_predicate_entailment resulting from review of EII

r? `@lcnr`

Just the comment update separately from https://github.com/rust-lang/rust/pull/146348/files since it doesn't really belong in that PR. Should be trivial
-rw-r--r--compiler/rustc_hir_analysis/src/check/compare_impl_item.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs
index 84fb09b7390..946c4936bb6 100644
--- a/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs
+++ b/compiler/rustc_hir_analysis/src/check/compare_impl_item.rs
@@ -298,14 +298,9 @@ fn compare_method_predicate_entailment<'tcx>(
     // compatible with that of the trait method. We do this by
     // checking that `impl_fty <: trait_fty`.
     //
-    // FIXME. Unfortunately, this doesn't quite work right now because
-    // associated type normalization is not integrated into subtype
-    // checks. For the comparison to be valid, we need to
-    // normalize the associated types in the impl/trait methods
-    // first. However, because function types bind regions, just
-    // calling `FnCtxt::normalize` would have no effect on
-    // any associated types appearing in the fn arguments or return
-    // type.
+    // FIXME: We manually instantiate the trait method here as we need
+    // to manually compute its implied bounds. Otherwise this could just
+    // be `ocx.sub(impl_sig, trait_sig)`.
 
     let mut wf_tys = FxIndexSet::default();