Handle multiple applicable projection candidates
This commit is contained in:
parent
bc08b791bc
commit
cfee49593d
6 changed files with 82 additions and 37 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue