T: Sized necessarily imply that
*const T is a thin pointer? This is the case in today’s Rust, but do we want to "promise" or document that it will always be?
std::mem::transmute::<*const T, usize> is allowed, so it looks like it's guaranteed (at least on current targets).
I believe this is something we could not change, yes
It’ll just operate on the data pointer I believe?
@eddyb argued in the past that the vtable pointer is actually the part of
something along those lines.
And so it is your responsibility to reconstruct the right vtable pointer if you want to convert
usize to a fat pointer.
Yes you can cast a fat pointer with
as and get the data part only, but
transmute checks that
size_of::<*const T>() == size_of::<usize>()