]> git.proxmox.com Git - rustc.git/blobdiff - compiler/rustc_middle/src/traits/select.rs
New upstream version 1.66.0+dfsg1
[rustc.git] / compiler / rustc_middle / src / traits / select.rs
index 53af3e905341960e528da3528de1c91336cee72c..85ead3171e785fca3148a741506b37092df176ae 100644 (file)
@@ -115,12 +115,13 @@ pub enum SelectionCandidate<'tcx> {
 
     ParamCandidate(ty::PolyTraitPredicate<'tcx>),
     ImplCandidate(DefId),
-    AutoImplCandidate(DefId),
+    AutoImplCandidate,
 
     /// 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),
+    /// into the list returned by `tcx.item_bounds`. The constness is the
+    /// constness of the bound in the trait.
+    ProjectionCandidate(usize, ty::BoundConstness),
 
     /// Implementation of a `Fn`-family trait by one of the anonymous types
     /// generated for an `||` expression.
@@ -142,7 +143,7 @@ pub enum SelectionCandidate<'tcx> {
     /// Builtin implementation of `Pointee`.
     PointeeCandidate,
 
-    TraitAliasCandidate(DefId),
+    TraitAliasCandidate,
 
     /// Matching `dyn Trait` with a supertrait of `Trait`. The index is the
     /// position in the iterator returned by
@@ -160,9 +161,6 @@ pub enum SelectionCandidate<'tcx> {
 
     /// Implementation of `const Destruct`, optionally from a custom `impl const Drop`.
     ConstDestructCandidate(Option<DefId>),
-
-    /// Witnesses the fact that a type is a tuple.
-    TupleCandidate,
 }
 
 /// The result of trait evaluation. The order is important