Update lins

This commit is contained in:
Léo Lanteri Thauvin 2021-03-09 11:44:02 +01:00 committed by Joshua Nelson
parent 9692e9e9a1
commit 6753e20cbe
1 changed files with 5 additions and 3 deletions

View File

@ -33,10 +33,12 @@ But it has some other interesting features that distinguish it from the HIR:
[HIR]: ./hir.md
The THIR lives in [`rustc_mir_build::thir`][thir]. To construct a `thir::Expr`,
you can use the `build_thir` function, passing in the memory arena where the THIR
The THIR lives in [`rustc_mir_build::thir`][thir-docs]. To construct a [`thir::Expr`],
you can use the [`build_thir`] function, passing in the memory arena where the THIR
will be allocated. Dropping this arena will result in the THIR being destroyed,
which is useful to keep peak memory in check. Having a THIR representation of
all bodies of a crate in memory at the same time would be very heavy.
[thir]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_build/thir/index.html
[thir-docs]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_build/thir/index.html
[`thir::Expr`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_build/thir/struct.Expr.html
[`build_thir`]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir_build/thir/fn.build_thir.html