`mem::uninitialized` and `const fn`


#1

Can core::mem::uninitialized be a const fn, since it doesn’t do anything?


#2

My feeling is that someone should just open a PR and we FCP it, because you can do zeroed/uninitialized with horrible hacks in constants, so why not allow the nice obvious ways, too!?


#3

Woop sounds like fun :slight_smile:


#4

Deprecating uninitialized is in P-FCP merge, so I’m not sure that new features for it would be accepted.


#5

Assuming zeroed does the same thing as manually initializing stuff to the value 0 (as in, put the data in .bss), a const zeroed would have the same practical effect as a const uninitialized.