Closed
Description
I tried this code: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=a122541641e9a77365b11b861971d578
According to previous information the first usize pointed by the trait object's metadata/vtable is the size of the struct. This is reiterated in the documentation of the https://doc.rust-lang.org/beta/std/ptr/struct.DynMetadata.html. Did the layout of trait object metadata change?
I expected to see this happen: see the struct's size as the first usize pointed by the trait object's metadata pointer.
Instead, this happened: junk value printed, the second usize appears to be the size of the struct and the third is the alignment.
Is this related to the deprecation of std::raw::TraitObject/#84207?