1
Fork 0

Add bound_predicates_of and bound_explicit_predicates_of

This commit is contained in:
Jack Huey 2022-08-02 22:44:08 -04:00
parent 4493a0f472
commit e21624dc80
5 changed files with 58 additions and 42 deletions

View file

@ -680,6 +680,20 @@ impl<'tcx> TyCtxt<'tcx> {
pub fn bound_const_param_default(self, def_id: DefId) -> ty::EarlyBinder<ty::Const<'tcx>> {
ty::EarlyBinder(self.const_param_default(def_id))
}
pub fn bound_predicates_of(
self,
def_id: DefId,
) -> ty::EarlyBinder<ty::generics::GenericPredicates<'tcx>> {
ty::EarlyBinder(self.predicates_of(def_id))
}
pub fn bound_explicit_predicates_of(
self,
def_id: DefId,
) -> ty::EarlyBinder<ty::generics::GenericPredicates<'tcx>> {
ty::EarlyBinder(self.explicit_predicates_of(def_id))
}
}
struct OpaqueTypeExpander<'tcx> {