Closed
Description
This came up a few weeks ago in libs triage specifically related to #48493 where we were wondering if there were other locations in the standard library that needed to be adjusted to handle uninhabited enums being handled in generic locations. While not many locations in the standard library leapt to mind one thing we thought of was the offset_of!
macro.
For example if we've got something like:
struct Foo<T> { a: T, b: usize }
do existing offset_of!
macros handle this?
offset_of!(Foo<Void>, b)
or is there "technical UB that rustc may paper over today" somewhere in there?
cc @dtolnay, I think you had better ideas about examples here than I!