slice_dst

Function alloc_slice_dst

Source
pub fn alloc_slice_dst<S: ?Sized + SliceDst>(len: usize) -> NonNull<S>
Expand description

Allocate a slice-based DST with the global allocator.

The returned pointer is owned and completely uninitialized; you are required to initialize it correctly.

If the type to be allocated has zero size, then an arbitrary aligned dangling nonnull pointer is returned.