Function rustc_trait_selection::traits::object_safety::receiver_for_self_ty
source · fn receiver_for_self_ty<'tcx>(
tcx: TyCtxt<'tcx>,
receiver_ty: Ty<'tcx>,
self_ty: Ty<'tcx>,
method_def_id: DefId
) -> Ty<'tcx>
Expand description
Performs a type substitution to produce the version of receiver_ty
when Self = self_ty
.
For example, for receiver_ty = Rc<Self>
and self_ty = Foo
, returns Rc<Foo>
.