Skip to content

Commit 61824dd

Browse files
JohnTitormark-i-m
authored andcommitted
Mention HAIR to clarify
1 parent d89c8c9 commit 61824dd

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/mir/construction.md

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ list of items:
1414
The lowering is triggered by calling the [`mir_built`] query.
1515
There is an intermediate representation
1616
between [HIR] and [MIR] called the [THIR] that is only used during the lowering.
17+
[THIR] means "Typed HIR" and used to be called "HAIR (High-level Abstract IR)".
1718
The [THIR]'s most important feature is that the various adjustments (which happen
1819
without explicit syntax) like coercions, autoderef, autoref and overloaded method
1920
calls have become explicit casts, deref operations, reference expressions or

src/overview.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ for different purposes:
187187
- High-level IR (HIR): This is a sort of desugared AST. It's still close
188188
to what the user wrote syntactically, but it includes some implicit things
189189
such as some elided lifetimes, etc. This IR is amenable to type checking.
190-
- Typed HIR (THIR): This is an intermediate between HIR and MIR. It is like the HIR
191-
but it is fully typed and a bit more desugared (e.g. method calls and implicit
192-
dereferences are made fully explicit). Moreover, it is easier to lower to MIR
193-
from THIR than from HIR.
190+
- Typed HIR (THIR): This is an intermediate between HIR and MIR, and used to be called
191+
High-level Abstract IR (HAIR). It is like the HIR but it is fully typed and a bit
192+
more desugared (e.g. method calls and implicit dereferences are made fully explicit).
193+
Moreover, it is easier to lower to MIR from THIR than from HIR.
194194
- Middle-level IR (MIR): This IR is basically a Control-Flow Graph (CFG). A CFG
195195
is a type of diagram that shows the basic blocks of a program and how control
196196
flow can go between them. Likewise, MIR also has a bunch of basic blocks with

0 commit comments

Comments
 (0)