Handle multiple applicable projection candidates
This commit is contained in:
parent
bc08b791bc
commit
cfee49593d
6 changed files with 82 additions and 37 deletions
|
@ -157,7 +157,7 @@ rustc_queries! {
|
|||
}
|
||||
|
||||
/// Returns the list of bounds that can be used for
|
||||
/// `SelectionCandidate::ProjectionCandidate` and
|
||||
/// `SelectionCandidate::ProjectionCandidate(_)` and
|
||||
/// `ProjectionTyCandidate::TraitDef`.
|
||||
/// Specifically this is the bounds written on the trait's type
|
||||
/// definition, or those after the `impl` keyword
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue