Skip to content

Commit

Permalink
Update memory.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Tbkhi authored Mar 12, 2024
1 parent bf87480 commit 1ae4bea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/memory.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ the arenas, anyhow).
### A Note On Lifetimes

The Rust compiler is a fairly large program containing lots of big data
structures (e.g. the Abstract Syntax Tree (`AST`), [High-Level Intermediate
structures (e.g. the [Abstract Syntax Tree (`AST`)][ast], [High-Level Intermediate
Representation (`HIR`)][hir], and the type system) and as such, arenas and
references are heavily relied upon to minimize unnecessary memory use. This
manifests itself in the way people can plug into the compiler (i.e. the
Expand All @@ -98,5 +98,6 @@ duplication while also preventing a lot of the ergonomic issues due to many
pervasive lifetimes. The [`rustc_middle::ty::tls`][tls] module is used to access these
thread-locals, although you should rarely need to touch it.

[ast]: ./ast-validation.md
[hir]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/index.html
[tls]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/ty/tls/index.html

0 comments on commit 1ae4bea

Please sign in to comment.