Uh oh!
There was an error while loading. Please reload this page.
std.static_string_map: Cast length of input for runtime initialization - #20350
Conversation
Thanks for catching that. Would you mind adding a small test which would otherwise fail without this patch? EDIT: Maybe adjust this test, casting |
nektro
commented
Jun 20, 2024
why is the len field u32 instead of usize? |
archaistvolts
commented
Jun 20, 2024
This was done as an optimization in #19719
|
burgerindividual
commented
Jun 20, 2024
I updated the test case and verified that it does not compile without the additional |
archaistvolts
commented
Jun 20, 2024
Thanks! Looks good. |
In the
initfunction, there seems to be a missing@intCastfor the length of the input to a u32, which breaks usage of the function with a slice input. This should be possible, and the change reflects the cast ininitComptime.