I’m learning Rust and am trying to use cargo-expand on the default Hello, World program. From what I understand it’s supposed to expand all the macros, but when I use it, it leaves in a macro that another macro generates.
From what I understood, the output of cargo expand should expand everything, so I’m a little confused. I tried googling and searching for an answer but everything I read showed no macros within the output.
Is this right or not?
>Solution :
If you mean the format_args!, I’ll quote dtolnay (the cargo-expand maintainer) from this issue:
This is working correctly.
format_argsdoes not expand to Rust code. (In the past it used to.)
Cargo-expand does recursively expand macros. Just in this case it can’t.
