I just started to review the rustc compiler code.
I want to change the allocated buffer size for my-string variable in the below code.
I mean instead of 12 I want to allocate a buffer with the length of 20.
For-loops and [T]::copy_from_slice() aren't available inside const functions yet, so I had to use a while-loop to copy the string's bytes across one-by-one
Thanks for your reply. But, I am developing a system and I want to hide this complexity from the users.
So, I want to apply this in compiler level or any reasonable method that allows user to only define their string. I should receive the string and change the allocated buffer size and fill the rest with some specific chars.