Add bound_predicates_of and bound_explicit_predicates_of
This commit is contained in:
parent
4493a0f472
commit
e21624dc80
5 changed files with 58 additions and 42 deletions
|
@ -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> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue