Conversation
Stringifying a non-string $:literal for passing into the format_args
call is incompatible with format args capture: "to avoid ambiguity,
`format_args!` cannot capture variables when the format string is
expanded from a macro".
error: there is no argument named `var`"
--> src/main.rs:3:26
|
3 | let _ = format_args!(concat!("{var}"));
| ^^^^^^^^^^^^^^^^
|
= note: did you intend to capture a variable `var` from the surrounding scope?
= note: to avoid ambiguity, `format_args!` cannot capture variables when the format string is expanded from a macro
|
Using (And right now it also means that Also thanks for making and maintaining this crate! It's great. |
Required in order for rust-lang/rust#90473 to be usable inside the macro argument.