Skip to content

Commit 02c7b1a

Browse files
committed
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
2 parents 637b50b + 365189e commit 02c7b1a

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

compiler/rustc_hir_analysis/src/check/compare_impl_item.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -298,14 +298,9 @@ fn compare_method_predicate_entailment<'tcx>(
298298
// compatible with that of the trait method. We do this by
299299
// checking that `impl_fty <: trait_fty`.
300300
//
301-
// FIXME. Unfortunately, this doesn't quite work right now because
302-
// associated type normalization is not integrated into subtype
303-
// checks. For the comparison to be valid, we need to
304-
// normalize the associated types in the impl/trait methods
305-
// first. However, because function types bind regions, just
306-
// calling `FnCtxt::normalize` would have no effect on
307-
// any associated types appearing in the fn arguments or return
308-
// type.
301+
// FIXME: We manually instantiate the trait method here as we need
302+
// to manually compute its implied bounds. Otherwise this could just
303+
// be `ocx.sub(impl_sig, trait_sig)`.
309304

310305
let mut wf_tys = FxIndexSet::default();
311306

0 commit comments

Comments
 (0)