Re: [PATCH v3 02/16] rust: mem: add `transmute` with deferred size check
| Newsgroups | org.kernel.vger.linux-pci,org.freedesktop.lists.dri-devel |
|---|---|
| Message-ID | <[email protected]> |
> Implement a `transmute_unchecked/transmute` that checks size at > monomorphization time instead of type-checking time. This allows more cases > where we know that the size matches but this is not generically checkable. > > The signature is equivalent to the unstable `transmute_neo` function in the > standard library. A safe variant is provided to use with types implementing > `FromBytes` and `IntoBytes`. > > Existing users of `transmute_copy` to bypass size checks are converted. > > Signed-off-by: Gary Guo <[email protected]> Sashiko has reviewed this patch and found no issues. It looks great! -- Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2