Introduce subst_iter and subst_iter_copied on EarlyBinder
This commit is contained in:
parent
eecde5850c
commit
aa8931c612
9 changed files with 59 additions and 57 deletions
|
@ -338,8 +338,7 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
|
||||
let bounds = self.tcx.bound_explicit_item_bounds(*def_id);
|
||||
|
||||
for predicate in bounds.transpose_iter().map(|e| e.map_bound(|(p, _)| *p)) {
|
||||
let predicate = predicate.subst(self.tcx, substs);
|
||||
for (predicate, _) in bounds.subst_iter_copied(self.tcx, substs) {
|
||||
let output = predicate
|
||||
.kind()
|
||||
.map_bound(|kind| match kind {
|
||||
|
|
|
@ -543,10 +543,7 @@ impl<'tcx> InferCtxt<'tcx> {
|
|||
|
||||
let item_bounds = tcx.bound_explicit_item_bounds(def_id.to_def_id());
|
||||
|
||||
for predicate in item_bounds.transpose_iter().map(|e| e.map_bound(|(p, _)| *p)) {
|
||||
debug!(?predicate);
|
||||
let predicate = predicate.subst(tcx, substs);
|
||||
|
||||
for (predicate, _) in item_bounds.subst_iter_copied(tcx, substs) {
|
||||
let predicate = predicate.fold_with(&mut BottomUpFolder {
|
||||
tcx,
|
||||
ty_op: |ty| match *ty.kind() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue