Closed Freax13 closed 1 year ago
Thanks for the PR! Just noting it will probably take me a while longer to get around to reviewing it, sorry about that!
Ping @fu5ha @Lokathor
I just rebased this onto the latest main branch.
I gave fusha a poke on discord and she said she'd try to get to this soon.
Thanks for the patience on my review. Nice work! Hope you don't mind I took the liberty of changing some variable names and adding some comments to the new derives as I went through and tried to verify them. As far as I can tell it all checks out :)
Sure, thanks, your changes look good to me.
Could you update the doc comment on the checked bit pattern proc macro derive fn in the derive crate
lib.rs
to reflect the new capabilities and restrictions on enums with fields? Other than that, I think this seems ready to merge.
Done. I noticed that the description was already out of date even before this pr, so I also updated the parts no related to enums.
@Lokathor Could please you create a new release for bytemuck_derive? Thanks!
Ahhhh, sorry about that. Next time definitely don't feel bad about pinging me sooner if you need to.
bytemuck_derive-1.6.0
is out now!
This pr consist of two parts:
Representation
typeCheckedBitPattern
for enums with fieldsThe following representations have a stable type layout for enums with fields and are now supported in the
CheckedBitPattern
derive macro:#[repr(C)]
#[repr(C, int)]
#[repr(int)]
#[repr(transparent)]
The representations are specified at https://doc.rust-lang.org/reference/type-layout.html.
Closes #166