Vec<MaybeUninit<u8>> transmute to Vec<u8> #7706
Labels
C-bug
Category: Clippy is not doing the correct thing
I-false-positive
Issue: The lint was triggered on code it shouldn't have
Lint name:
unsound_collection_transmute
I tried this code:
I expected to see this happen: assuming MaybeUninit has been initialized, this should be safe, since MaybeUninit should have same layout as inner type
Instead, this happened:
Btw, it seems strange, but if I instead make the function generic, everything is ok:
Meta
Ran on playground
The text was updated successfully, but these errors were encountered: