From 283ccb16091ff217a13198f5448d88a8881a43a7 Mon Sep 17 00:00:00 2001 From: mox692 Date: Sat, 23 Dec 2023 13:24:05 +0900 Subject: [PATCH] Add mention of --- src/hir.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/hir.md b/src/hir.md index 160b47645..18a9f4dd9 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