Lokathor / bytemuck

A crate for mucking around with piles of bytes
https://docs.rs/bytemuck
Apache License 2.0
725 stars 79 forks source link

Fix soundness issue of TransparentWrapper derive macro. #173

Closed zachs18 closed 1 year ago

zachs18 commented 1 year ago

May resolve #170.

Uses the compiler to check that all non-wrapped fields are actually 1-ZSTs, and uses Zeroable to check that all non-wrapped fields are "conjurable" (See discussion in the linked issue).

Additionally, relaxes the bound of impl<T: Zeroable> Zeroable for PhantomData<T> to all T: ?Sized.