bytemuck/derive
Tom Dohrmann 2d1f876216
various small fixes to the derive macros (#168)
* parse `repr(usize)` and `repr(isize)`

This can be used with enums.

* emit packed repr without type suffix

Previously we emitted the packed attribute with a type suffix for the
value `packed(4u32)`. This is not allowed. Instead we should emit
`packed(4)`.

* read bits instead of creating reference

This is required for packed structs where creating a reference to
fields is not allowed. We can make a copy of the bits because the bits
are `AnyBitPattern` which implies `Copy`.

* emit generics on implied traits
2023-01-25 21:49:46 -07:00
..
src various small fixes to the derive macros (#168) 2023-01-25 21:49:46 -07:00
tests Allow byte literals as enum discriminants in CheckedBitPattern derive macro. (#155) 2022-12-29 17:23:14 -07:00
Cargo.toml chore: Release bytemuck_derive version 1.4.0 2023-01-19 17:45:46 -07:00
changelog.md changelog 2023-01-19 17:44:21 -07:00
LICENSE-APACHE Replace LICENCES-* symlinks with a licence copy. (#118) 2022-07-13 06:53:17 -06:00
LICENSE-MIT Replace LICENCES-* symlinks with a licence copy. (#118) 2022-07-13 06:53:17 -06:00
LICENSE-ZLIB Replace LICENCES-* symlinks with a licence copy. (#118) 2022-07-13 06:53:17 -06:00
README.md bytemuck_derive: readme 2020-08-20 19:46:22 -06:00

bytemuck_derive

Derive macros for bytemuck traits.