Closed
Description
Like #10485, but using Rust's pretty-printed debug output ({:#?}
) instead of a JSON encoding. This would be much easier for a human to read when trying to visualize how rustc interprets a particular syntax element (like I am right now). It could also be easily added to play.rust-lang.org as an additional output target, alongside the current ASM, LLVM IR, and MIR options. The output format wouldn't need to be stable or standardized, this would just be a debugging tool.
I imagine this would entail two additional -Z
options, ast
and ast-noexpand
, to match ast-json
and ast-json-noexpand
. Am up for preparing a PR if one would be welcomed, implementation appears straightforward at first glance.