dtolnay/cargo-expand

Add option to pass expanded output to rustc

bluebear94 opened this issue · 2 comments

This would make it easier to debug compilation errors inside the expanded code, since such errors highlight the code in the use of the macro instead of the expanded code.

The expansion process is not designed to necessarily create compilable source code, so I would prefer not to add this. It's only a debugging aid for human inspection.

Thanks for the answer. The reason I asked is that the expanded code can be large, and figuring out where a typing error in the expanded code is pointing to can be helpful.