1
Fork 0

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

@ -105,9 +105,10 @@ pub enum SelectionCandidate<'tcx> {
ImplCandidate(DefId),
AutoImplCandidate(DefId),
/// This is a trait matching with a projected type as `Self`, and
/// we found an applicable bound in the trait definition.
ProjectionCandidate,
/// This is a trait matching with a projected type as `Self`, and we found
/// an applicable bound in the trait definition. The `usize` is an index
/// into the list returned by `tcx.item_bounds`.
ProjectionCandidate(usize),
/// Implementation of a `Fn`-family trait by one of the anonymous types
/// generated for a `||` expression.