We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
unpretty=hir
unpretty=hir-tree
1 parent b98af7d commit 886d821Copy full SHA for 886d821
src/hir-debugging.md
@@ -1,6 +1,11 @@
1
# HIR Debugging
2
3
-The `-Z unpretty=hir-tree` flag will dump out the HIR.
+Use the `-Z unpretty=hir` flag to produce a human-readable representation of the HIR.
4
+For cargo projects this can be done with `cargo rustc -- -Z unpretty=hir`.
5
+This output is useful when you need to see at a glance how your code was desugared and transformed during AST lowering.
6
+
7
+For a full `Debug` dump of the data in the HIR, use the `-Z unpretty=hir-tree` flag.
8
+This may be useful when you need to see the full structure of the HIR from the perspective of the compiler.
9
10
If you are trying to correlate `NodeId`s or `DefId`s with source code, the
11
`-Z unpretty=expanded,identified` flag may be useful.
0 commit comments