rustc_mir_transform::shim

Function build_fn_ptr_addr_shim

Source
fn build_fn_ptr_addr_shim<'tcx>(
    tcx: TyCtxt<'tcx>,
    def_id: DefId,
    self_ty: Ty<'tcx>,
) -> Body<'tcx>
Expand description
impl FnPtr for fn(u32) {
    fn addr(self) -> usize {
        self as usize
    }
}