1
Fork 0

Introduce PredicateKind::Clause

This commit is contained in:
Santiago Pastorino 2022-11-24 18:14:58 -03:00
parent 42cc8e8f4e
commit 974e2837bb
No known key found for this signature in database
GPG key ID: 8131A24E0C79EFAF
75 changed files with 568 additions and 407 deletions

View file

@ -1476,7 +1476,9 @@ fn assemble_candidates_from_predicates<'cx, 'tcx>(
let infcx = selcx.infcx();
for predicate in env_predicates {
let bound_predicate = predicate.kind();
if let ty::PredicateKind::Projection(data) = predicate.kind().skip_binder() {
if let ty::PredicateKind::Clause(ty::Clause::Projection(data)) =
predicate.kind().skip_binder()
{
let data = bound_predicate.rebind(data);
if data.projection_def_id() != obligation.predicate.item_def_id {
continue;