3 ms·
The Rust formatting macros depend on string literals because the macro expansion necessarily happens at compile-time, which means that it's not possible to over
by MathiasPius 5y ago
The Rust formatting macros depend on string literals because the macro expansion necessarily happens at compile-time, which means that it's not possible to override the actual format string at runtime, nor is recursive resolution possible.
It's obviously still possible to implement the Display trait for a type in a way which makes it susceptible to code execution attacks, but that doesn't really have anything to do with string formatting.
- deleted 5y ago[deleted]