diff options
| author | kim / Motoyuki Kimura <55653825+mox692@users.noreply.github.com> | 2023-12-29 10:07:07 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-29 10:07:07 +0900 |
| commit | a8cbf66f842a67bbcca1f65c9de7ca25e033ac2f (patch) | |
| tree | e3a0981f8c159b2c0be6355edde2b6d351e5c299 /src | |
| parent | 29d53e315c03b2d43057d35fbb606c71e9fa71f6 (diff) | |
| download | rust-a8cbf66f842a67bbcca1f65c9de7ca25e033ac2f.tar.gz rust-a8cbf66f842a67bbcca1f65c9de7ca25e033ac2f.zip | |
Add a description of `unpretty=hir` to the HIR docs (#1842)
Diffstat (limited to 'src')
| -rw-r--r-- | src/doc/rustc-dev-guide/src/hir.md | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/doc/rustc-dev-guide/src/hir.md b/src/doc/rustc-dev-guide/src/hir.md index 160b4764520..18a9f4dd91a 100644 --- a/src/doc/rustc-dev-guide/src/hir.md +++ b/src/doc/rustc-dev-guide/src/hir.md @@ -20,6 +20,14 @@ You can view the HIR representation of your code by passing the cargo rustc -- -Z unpretty=hir-tree ``` + +You can also use the `-Z unpretty=hir` option to generate a HIR +that is closer to the original source code expression: + +```bash +cargo rustc -- -Z unpretty=hir +``` + ## Out-of-band storage and the `Crate` type The top-level data-structure in the HIR is the [`Crate`], which stores |
