1
Fork 0

Fix bootstrap

This commit is contained in:
Matthew Jasper 2020-07-25 15:14:12 +01:00
parent ed32482534
commit 6c4feb681f
4 changed files with 7 additions and 5 deletions

View file

@ -978,7 +978,9 @@ fn assemble_candidates_from_predicates<'cx, 'tcx>(
if is_match {
candidate_set.push_candidate(ctor(data));
if potentially_unnormalized_candidates && !obligation.predicate.needs_infer() {
if potentially_unnormalized_candidates
&& !obligation.predicate.has_infer_types_or_consts()
{
// HACK: Pick the first trait def candidate for a fully
// inferred predicate. This is to allow duplicates that
// differ only in normalization.

View file

@ -165,7 +165,7 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
debug!("winnowed to {} candidates for {:?}: {:?}", candidates.len(), stack, candidates);
let needs_infer = stack.obligation.predicate.needs_infer();
let needs_infer = stack.obligation.predicate.has_infer_types_or_consts();
// If there are STILL multiple candidates, we can further
// reduce the list by dropping duplicates -- including