// We check this by calling is_of_param on the relevant types
// from the various possible predicates
- match predicate.skip_binders() {
+ let bound_predicate = predicate.bound_atom(select.infcx().tcx);
+ match bound_predicate.skip_binder() {
ty::PredicateAtom::Trait(p, _) => {
if self.is_param_no_infer(p.trait_ref.substs)
&& !only_projections
{
self.add_user_pred(computed_preds, predicate);
}
- predicates.push_back(ty::Binder::bind(p));
+ predicates.push_back(bound_predicate.map_bound_ref(|_| p));
}
ty::PredicateAtom::Projection(p) => {
- let p = ty::Binder::bind(p);
+ let p = bound_predicate.map_bound_ref(|_| p);
debug!(
"evaluate_nested_obligations: examining projection predicate {:?}",
predicate
}
}
ty::PredicateAtom::RegionOutlives(binder) => {
- let binder = ty::Binder::bind(binder);
+ let binder = bound_predicate.map_bound_ref(|_| binder);
if select.infcx().region_outlives_predicate(&dummy_cause, binder).is_err() {
return false;
}
}
ty::PredicateAtom::TypeOutlives(binder) => {
- let binder = ty::Binder::bind(binder);
+ let binder = bound_predicate.map_bound_ref(|_| binder);
match (
binder.no_bound_vars(),
binder.map_bound_ref(|pred| pred.0).no_bound_vars(),