From 03cf281953fb532ddde6adbb107bf6ad0fd7331e Mon Sep 17 00:00:00 2001 From: kim / Motoyuki Kimura <55653825+mox692@users.noreply.github.com> Date: Fri, 29 Dec 2023 10:07:07 +0900 Subject: [PATCH] Add a description of `unpretty=hir` to the HIR docs (#1842) --- src/hir.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hir.md b/src/hir.md index 160b4764..18a9f4dd 100644 --- a/src/hir.md +++ b/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