pub fn as_ptr(&self) -> *const T {
        let ptr: *mut ArcInner<T> = NonNull::as_ptr(self.ptr);

        if is_dangling(ptr) {
            // If the pointer is dangling, we return the sentinel directly. This cannot be
            // a valid payload address, as the payload is at least as aligned as ArcInner (usize).
            ptr as *const T
        } else {
            // SAFETY: if is_dangling returns false, then the pointer is dereferencable.
            // The payload may be dropped at this point, and we have to maintain provenance,
            // so use raw pointer manipulation.
            unsafe { ptr::addr_of_mut!((*ptr).data) }
        }
    }
Converts a raw pointer previously created by [`into_raw`] back into `Weak<T>`.

This can be used to safely get a strong reference (by calling [`upgrade`]
later) or to deallocate the weak count by dropping the `Weak<T>`.

It takes ownership of one weak reference (with the exception of pointers created by [`new`],
as these don't own anything; the method still works on them).

# Safety

The pointer must have originated from the [`into_raw`] and must still own its potential
weak reference.

It is allowed for the strong count to be 0 at the time of calling this. Nevertheless, this
takes ownership of one weak reference currently represented as a raw pointer (the weak
count is not modified by this operation) and therefore it must be paired with a previous
call to [`into_raw`].
# Examples

```
use std::sync::{Arc, Weak};
benchmarks/haystacks/code/rust-library.rs