As discussed with @RalfJung here, it seems like the documentation for UnsafePinned<T> should guarantee the same layout as T, like UnsafeCell does.
I didn't mention it in that comment, but I think this also makes sense given that the documentation says that UnsafePinned is intended to subsume UnsafeCell.
As discussed with @RalfJung here, it seems like the documentation for
UnsafePinned<T>should guarantee the same layout asT, likeUnsafeCelldoes.I didn't mention it in that comment, but I think this also makes sense given that the documentation says that
UnsafePinnedis intended to subsumeUnsafeCell.