about summary refs log tree commit diff
path: root/compiler/rustc_middle/src/traits
diff options
context:
space:
mode:
authorDeadbeef <ent3rm4n@gmail.com>2022-09-18 17:38:18 +0000
committerDeadbeef <ent3rm4n@gmail.com>2022-09-18 18:05:30 +0000
commitee96ae0a32d35b81103f666ea5ebd898714fa433 (patch)
tree7260ac258185b7b680e44aa74e08b34373d94514 /compiler/rustc_middle/src/traits
parent4af79ccd5e23c7cbaabcd7aefdda3b715abde606 (diff)
downloadrust-ee96ae0a32d35b81103f666ea5ebd898714fa433.tar.gz
rust-ee96ae0a32d35b81103f666ea5ebd898714fa433.zip
make projection bounds with const bounds satisfy const
Diffstat (limited to 'compiler/rustc_middle/src/traits')
-rw-r--r--compiler/rustc_middle/src/traits/select.rs5
1 files changed, 3 insertions, 2 deletions
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.