make projection bounds with const bounds satisfy const

This commit is contained in:
Deadbeef
2022-09-18 17:38:18 +00:00
parent 4af79ccd5e
commit ee96ae0a32
5 changed files with 33 additions and 15 deletions

View File

@@ -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.