From 20431706a863f92cb37dc512fef6e48d192aaf2c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- compiler/rustc_middle/src/traits/select.rs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'compiler/rustc_middle/src/traits/select.rs') diff --git a/compiler/rustc_middle/src/traits/select.rs b/compiler/rustc_middle/src/traits/select.rs index 53af3e905..85ead3171 100644 --- a/compiler/rustc_middle/src/traits/select.rs +++ b/compiler/rustc_middle/src/traits/select.rs @@ -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), - - /// Witnesses the fact that a type is a tuple. - TupleCandidate, } /// The result of trait evaluation. The order is important -- cgit v1.2.3