vstd::raw_ptr

Function ptr_null

Source
pub open spec fn ptr_null<T: ?Sized + Pointee<Metadata = ()>>() -> *const T
Expand description
{
    ptr_from_data(PtrData {
        addr: 0,
        provenance: Provenance::null(),
        metadata: Metadata::Thin,
    })
}

Constructs a null pointer. NOTE: Trait aliases are not yet supported, so we use Pointee<Metadata = ()> instead of core::ptr::Thin here