Idea: Macro for constructing Strings without format!

For those following along at home, why does format! need compiler magic?

std::fmt::Arguments can only be created by the compiler, as its fields are private. However, every part of the chain above that can absolutely be done in a proc macro.

Although. I don't see why it shouldn't be possible to have an unsafe public API for the construction of a std::fmt::Arguments. I'm not familiar with its internals, though.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.