Closed Cldfire closed 3 years ago
Oh, duh. That's not UB because the contents of the array are actually initialized there, as uninitialized data.
Also realized it's copied from the impl in the stdlib.
Closing, my bad! 😄
The assume_init
is fine becaue the array values are themselves MaybeUninit
, yeah.
I happened to notice this while glancing around the code for #82. Link to src.
Based on the docs for
assume_init
, it sounds like this is UB: