From ee96ae0a32d35b81103f666ea5ebd898714fa433 Mon Sep 17 00:00:00 2001 From: Deadbeef Date: Sun, 18 Sep 2022 17:38:18 +0000 Subject: make projection bounds with const bounds satisfy const --- compiler/rustc_middle/src/traits/select.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'compiler/rustc_middle/src/traits') diff --git a/compiler/rustc_middle/src/traits/select.rs b/compiler/rustc_middle/src/traits/select.rs index 53af3e90534..6bcdfd6394a 100644 --- a/compiler/rustc_middle/src/traits/select.rs +++ b/compiler/rustc_middle/src/traits/select.rs @@ -119,8 +119,9 @@ pub enum SelectionCandidate<'tcx> { /// 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. -- cgit 1.4.1-3-g733a5