Over in rustix we're trying to move some buffers to maybe uninit. Unfortunately, knowing how big a buffer will be results in really ugly code (see link above), so I'd like to propose two changes to make unsafe code easier to write with itoa:
Add an unsafe hint to tell the compiler how much of itoa's buffer is used (based on MAX_STR_LEN). This will enable optimizations when copying from itoa's buffer to our own.
https://github.com/bytecodealliance/rustix/pull/1201/files#diff-0c1bf5756f1b043ec04ef125becca3922c5dd96e503c83dc1584649167f04d00R55
Over in rustix we're trying to move some buffers to maybe uninit. Unfortunately, knowing how big a buffer will be results in really ugly code (see link above), so I'd like to propose two changes to make unsafe code easier to write with itoa:
cc @sunfishcode