Pre-RFC: Define the behavior of `repr(transparent)` when all fields are zero-sized types

Actually I found a counterexample:

Maybe we have to say that empty arrays do not count as 1-ZST... at that point we should probably find a new name for this. E.g. a type is "ABI-trivial" if it has the same ABI as (). And repr(transparent) only allows any number of ABI-trivial fields plus one extra field.

There are more targets in this scary list though and I've not checked at all how they treat various kinds of 1-ZST:

2 Likes