Oh wow, Rust 1.89 finally allows
let f = format_args!("hello {name}!");
Such a simple-looking thing, but a long time coming.
github.com/rust-lang/ru...
Allow storing `format_args!()` in a variable by m-ou-se · Pull Request #140748 · rust-lang/rust
Fixes #92698
Tracking issue for super let: #139076
Tracking issue for format_args: #99012
This change allows:
let name = "world";
let f = format_args!("hello {name}!"); // New: ...