about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/traits
diff options
context:
space:
mode:
authorMatthew Jasper <mjjasper1@gmail.com>2020-07-23 21:59:20 +0100
committerMatthew Jasper <mjjasper1@gmail.com>2020-10-06 11:19:31 +0100
commitcfee49593d756bb97018d1d2ac194e0821d2dfca (patch)
tree6b93b9dc025cbf3275b384cc52fcd39d250ad3dd /compiler/rustc_middle/src/traits
parentbc08b791bce1c5b31052da5dfda74302b6f61a99 (diff)
downloadrust-cfee49593d756bb97018d1d2ac194e0821d2dfca.tar.gz
rust-cfee49593d756bb97018d1d2ac194e0821d2dfca.zip
Handle multiple applicable projection candidates
Diffstat (limited to 'compiler/rustc_middle/src/traits')
-rw-r--r--compiler/rustc_middle/src/traits/select.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_middle/src/traits/select.rs b/compiler/rustc_middle/src/traits/select.rs
index 6ad514c6be2..358ead507b4 100644
--- a/compiler/rustc_middle/src/traits/select.rs
+++ b/compiler/rustc_middle/src/traits/select.rs
@@ -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.