Re: [PATCH v3 02/16] rust: mem: add `transmute` with deferred size check

[email protected]
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.