Handle multiple applicable projection candidates

This commit is contained in:
Matthew Jasper 2020-07-23 21:59:20 +01:00
parent bc08b791bc
commit cfee49593d
6 changed files with 82 additions and 37 deletions

View file

@ -323,12 +323,12 @@ impl<'cx, 'tcx> SelectionContext<'cx, 'tcx> {
_ => return,
}
let result = self.infcx.probe(|_| {
self.match_projection_obligation_against_definition_bounds(obligation).is_some()
});
let result = self
.infcx
.probe(|_| self.match_projection_obligation_against_definition_bounds(obligation));
if result {
candidates.vec.push(ProjectionCandidate);
for predicate_index in result {
candidates.vec.push(ProjectionCandidate(predicate_index));
}
}