" James Munns Sorry for the..." <- > <@ivmarkov:matrix.org> James Munns Sorry for the ping and only if you know it up front, otherwise I'll test. If I do: > > ```rust > const FOO: Foo = Foo:new(); // `Foo`'s initial layout is "all 0s" + a few `MaybeUninit`s > unsafe { ptr.write(FOO) } > ``` > > rustc will be smart enough - _under all compiler opt settings_ - to optimize `ptr.write(FOO)` with `memset(..., 0, ...)`, right? (This is an evolution of our `Pool` conversation from yesterday and in a way related to the `SliceVec` discussion which had happened yesterday) Not 100% what it'll do. You could also use `ptr.write_bytes(0x00, core::mem::size_of::());` if you want to be certain