Add bound_impl_trait_ref

This commit is contained in:
Jack Huey
2022-05-08 20:53:36 -04:00
parent 6c05e8d009
commit 0247faed29
8 changed files with 28 additions and 25 deletions

View File

@@ -600,6 +600,10 @@ impl<'tcx> TyCtxt<'tcx> {
pub fn bound_fn_sig(self, def_id: DefId) -> EarlyBinder<ty::PolyFnSig<'tcx>> {
EarlyBinder(self.fn_sig(def_id))
}
pub fn bound_impl_trait_ref(self, def_id: DefId) -> Option<EarlyBinder<ty::TraitRef<'tcx>>> {
self.impl_trait_ref(def_id).map(|i| EarlyBinder(i))
}
}
struct OpaqueTypeExpander<'tcx> {