map_bound_ref -> rebind
This commit is contained in:
parent
11d62aa284
commit
eba10270c6
21 changed files with 77 additions and 78 deletions
|
@ -634,9 +634,9 @@ fn prune_cache_value_obligations<'a, 'tcx>(
|
|||
// indirect obligations (e.g., we project to `?0`,
|
||||
// but we have `T: Foo<X = ?1>` and `?1: Bar<X =
|
||||
// ?0>`).
|
||||
ty::PredicateAtom::Projection(data) => infcx
|
||||
.unresolved_type_vars(&bound_predicate.map_bound_ref(|_| data.ty))
|
||||
.is_some(),
|
||||
ty::PredicateAtom::Projection(data) => {
|
||||
infcx.unresolved_type_vars(&bound_predicate.rebind(data.ty)).is_some()
|
||||
}
|
||||
|
||||
// We are only interested in `T: Foo<X = U>` predicates, whre
|
||||
// `U` references one of `unresolved_type_vars`. =)
|
||||
|
@ -910,7 +910,7 @@ fn assemble_candidates_from_predicates<'cx, 'tcx>(
|
|||
debug!(?predicate);
|
||||
let bound_predicate = predicate.bound_atom(infcx.tcx);
|
||||
if let ty::PredicateAtom::Projection(data) = predicate.skip_binders() {
|
||||
let data = bound_predicate.map_bound_ref(|_| data);
|
||||
let data = bound_predicate.rebind(data);
|
||||
let same_def_id = data.projection_def_id() == obligation.predicate.item_def_id;
|
||||
|
||||
let is_match = same_def_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue