rustc_mir_transform::shim

Function build_clone_shim

Source
fn build_clone_shim<'tcx>(
    tcx: TyCtxt<'tcx>,
    def_id: DefId,
    self_ty: Ty<'tcx>,
) -> Body<'tcx>
Expand description

Builds a Clone::clone shim for self_ty. Here, def_id is Clone::clone.