pub unsafe fn assume_init(self) -> Box<[T], A> {
        let (raw, alloc) = Box::into_raw_with_allocator(self);
        unsafe { Box::from_raw_in(raw as *mut [T], alloc) }
    }
Constructs a box from a raw pointer in the given allocator.

After calling this function, the raw pointer is owned by the
resulting `Box`. Specifically, the `Box` destructor will call
the destructor of `T` and free the allocated memory. For this
to be safe, the memory must have been allocated in accordance
with the [memory layout] used by `Box` .

# Safety

This function is unsafe because improper use may lead to
memory problems. For example, a double-free may occur if the
function is called twice on the same raw pointer.


# Examples

Recreate a `Box` which was previously converted to a raw pointer
using [`Box::into_raw_with_allocator`]:
```
#![
benchmarks/haystacks/code/rust-library.rs