Skip to content

Commit 39bf7d6

Browse files
authored
Merge pull request #46 from theotherphil/dumphir
Explain how to dump HIR
2 parents 6ebe10d + 5ba0d6b commit 39bf7d6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/hir.md

+7
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ are converted into a `loop` and do not appear in the HIR).
99

1010
This chapter covers the main concepts of the HIR.
1111

12+
You can view the HIR representation of your code by passing the
13+
`-Zunpretty=hir-tree` flag to rustc:
14+
15+
```
16+
cargo rustc -- -Zunpretty=hir-tree
17+
```
18+
1219
### Out-of-band storage and the `Crate` type
1320

1421
The top-level data-structure in the HIR is the `Crate`, which stores

0 commit comments

Comments
 (0)