-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.
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.
tamaroning
Metadata
Metadata
Assignees
Labels
A-frontendArea: Compiler frontend (errors, parsing and HIR)Area: Compiler frontend (errors, parsing and HIR)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.