1 2 3 4 5 6 7 8 9
use std::ptr::NonNull; pub(crate) trait Ptr { type NonNull; } impl<T> Ptr for *mut T { type NonNull = NonNull<T>; }