[undefined.validity.union] dyn Trait raw pointer is subject to debate.. where's the debate?
Opened this issue · 3 comments
fasterthanlime commented
under undefined.validity.union:
dyn Traitmetadata must be a pointer to a compiler-generated vtable forTrait
(For raw pointers, this requirement remains a subject of some debate.)
which debate? where? how? I'd like to read more.
ia0 commented
fasterthanlime commented
Here's a possible source: rust-lang/rust#101336
kupiakos commented
There's been discussion about *const dyn Trait and whether it can have an invalid vtable pointer for pointer metadata stabilization: rust-lang/rust#81513
Oop, apparently in 2024 they decided that *const dyn Trait needed to have a valid vtable (which I personally disagree with - now it's impossible to have a null *const T for all T: ?Sized)