If we want to allow this to replace num_enum for some tasks, it might be useful.
Besides that I'm not so sure.
[x] repr(packed), repr(align(n)) is not useful here, since we only have one field
[x] repr(transparent) should just work (would turn into the inner type)
[ ] repr(uN) works on enums only, we could generate try/from impls for it
[ ] repr(C) should be investigated more, we currently transmute nested array fields like this: [[T; N]; M] = [T; N*M] and some people say ordering could get messed up that way (though, the nesting usecase is quite rare)
If we want to allow this to replace
num_enum
for some tasks, it might be useful. Besides that I'm not so sure.repr(packed)
,repr(align(n))
is not useful here, since we only have one fieldrepr(transparent)
should just work (would turn into the inner type)repr(uN)
works on enums only, we could generate try/from impls for itrepr(C)
should be investigated more, we currently transmute nested array fields like this:[[T; N]; M]
=[T; N*M]
and some people say ordering could get messed up that way (though, the nesting usecase is quite rare)