diff options
| author | bors <bors@rust-lang.org> | 2022-09-20 16:24:36 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-09-20 16:24:36 +0000 |
| commit | cd8cc91045281f7f1924ecc101f2c6002f6a1eee (patch) | |
| tree | 0182b7899fe870cda5f528f65dc9b2064651935d /compiler/rustc_middle/src | |
| parent | 4136b59b7da8866762761ed29405a5c5f58a5e3d (diff) | |
| parent | ee96ae0a32d35b81103f666ea5ebd898714fa433 (diff) | |
| download | rust-cd8cc91045281f7f1924ecc101f2c6002f6a1eee.tar.gz rust-cd8cc91045281f7f1924ecc101f2c6002f6a1eee.zip | |
Auto merge of #101989 - fee1-dead-contrib:const_trait_impl-assoc-caller-bounds, r=oli-obk
make projection bounds with const bounds satisfy const Fixes #101982.
Diffstat (limited to 'compiler/rustc_middle/src')
| -rw-r--r-- | compiler/rustc_middle/src/traits/select.rs | 5 |
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. |
