rustc_trait_selection::traits::dyn_compatibility

Function 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 instantiation 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>.