1
Fork 0

change usages of impl_trait_ref to bound_impl_trait_ref

This commit is contained in:
Kyle Matsuda 2023-01-10 14:22:52 -07:00
parent ef58baf8b8
commit be130b57d4
47 changed files with 134 additions and 100 deletions

View file

@ -101,7 +101,8 @@ impl<'tcx> TyCtxt<'tcx> {
}
pub fn impl_subject(self, def_id: DefId) -> ImplSubject<'tcx> {
self.impl_trait_ref(def_id)
self.bound_impl_trait_ref(def_id)
.map(|t| t.subst_identity())
.map(ImplSubject::Trait)
.unwrap_or_else(|| ImplSubject::Inherent(self.type_of(def_id)))
}