pub(crate) fn repr_nullable_ptr<'tcx>(
    cx: &LateContext<'tcx>,
    ty: Ty<'tcx>,
    ckind: CItemKind
) -> Option<Ty<'tcx>>
Expand description

Check if this enum can be safely exported based on the “nullable pointer optimization”. If it can, return the type that ty can be safely converted to, otherwise return None. Currently restricted to function pointers, boxes, references, core::num::NonZero*, core::ptr::NonNull, and #[repr(transparent)] newtypes. FIXME: This duplicates code in codegen.