change item_bounds query to return EarlyBinder; remove bound_item_bounds query
This commit is contained in:
parent
85eeaa9965
commit
fc942eed7f
9 changed files with 15 additions and 19 deletions
|
@ -99,12 +99,16 @@ pub(super) fn explicit_item_bounds(
|
|||
}
|
||||
}
|
||||
|
||||
pub(super) fn item_bounds(tcx: TyCtxt<'_>, def_id: DefId) -> &'_ ty::List<ty::Predicate<'_>> {
|
||||
tcx.mk_predicates(
|
||||
pub(super) fn item_bounds(
|
||||
tcx: TyCtxt<'_>,
|
||||
def_id: DefId,
|
||||
) -> ty::EarlyBinder<&'_ ty::List<ty::Predicate<'_>>> {
|
||||
let bounds = tcx.mk_predicates(
|
||||
util::elaborate_predicates(
|
||||
tcx,
|
||||
tcx.explicit_item_bounds(def_id).iter().map(|&(bound, _span)| bound),
|
||||
)
|
||||
.map(|obligation| obligation.predicate),
|
||||
)
|
||||
);
|
||||
ty::EarlyBinder(bounds)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue