Handle multiple trait-def projection candidates
This commit is contained in:
parent
0dfa6ff3be
commit
ed32482534
2 changed files with 23 additions and 0 deletions
|
@ -977,6 +977,13 @@ fn assemble_candidates_from_predicates<'cx, 'tcx>(
|
|||
|
||||
if is_match {
|
||||
candidate_set.push_candidate(ctor(data));
|
||||
|
||||
if potentially_unnormalized_candidates && !obligation.predicate.needs_infer() {
|
||||
// HACK: Pick the first trait def candidate for a fully
|
||||
// inferred predicate. This is to allow duplicates that
|
||||
// differ only in normalization.
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue