You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The TyVisitor impl in core::repr assumes it knows how enums are laid out, and can determine this based only on the number of variants. This will break if we want to do anything interesting with representations. In particular, this blocks #1271 (nullable pointers, which I have mostly implemented aside from this) and #1647 (smaller discriminants).
The text was updated successfully, but these errors were encountered:
This takes care of one of the last remnants of assumptions about enum layout. A type visitor is now passed a function to read a value's discriminant, then accesses fields by being passed a byte offset for each one. The latter may not be fully general, despite the constraints imposed on representations by borrowed pointers, but works for any representations currently planned and is relatively simple.
Closes#5652.
The
TyVisitor
impl incore::repr
assumes it knows how enums are laid out, and can determine this based only on the number of variants. This will break if we want to do anything interesting with representations. In particular, this blocks #1271 (nullable pointers, which I have mostly implemented aside from this) and #1647 (smaller discriminants).The text was updated successfully, but these errors were encountered: