Nested `format_args!` lifetime error

โš“ Rust    ๐Ÿ“… 2025-09-03    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 3      

surdeus

I recently noticed that Allow storing `format_args!()` in a variable by m-ou-se ยท Pull Request #140748 ยท rust-lang/rust ยท GitHub has been resolved.

This made me hope that the following would work:

However it doesn't seem to be that easy.

I finally got it to work using the super_let feature:

Now, I'm wondering if there's an easier way to do this.
I appreciate any input!

1 post - 1 participant

Read full topic

๐Ÿท๏ธ Rust_feed