Skip to content

Commit 1dd3236

Browse files
oli-obkmark-i-m
authored andcommitted
Address most other review comments
1 parent 9660fba commit 1dd3236

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/mir/construction.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ 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 [HAIR] that is only used during the lowering.
17-
The [HAIR]'s most important feature is that the various adjustments that happen
18-
without explicit syntax (coercion, autoderef, autoref, ...) have become explicit
19-
casts, deref operations or reference expressions.
17+
The [HAIR]'s most important feature is that the various adjustments (which happen
18+
without explicit syntax) like coercions, autoderef, autoref and overloaded method
19+
calls have become explicit casts, deref operations, reference expressions or
20+
concrete function calls.
2021

2122
The [HAIR] has datatypes that mirror the [HIR] datatypes, but instead of e.g. `-x`
2223
being a `hair::ExprKind::Neg(hair::Expr)` it is a `hair::ExprKind::Neg(hir::Expr)`.
2324
This shallowness enables the `HAIR` to represent all datatypes that [HIR] has, but
24-
without having to create an in-memory copy of the entire [HIR]. The [HAIR] also
25-
does a few simplifications, e.g. method calls and function calls have been merged
26-
into a single variant. [MIR] lowering will first convert the topmost expression from
25+
without having to create an in-memory copy of the entire [HIR].
26+
[MIR] lowering will first convert the topmost expression from
2727
[HIR] to [HAIR] (in
2828
[https://doc.rust-lang.org/nightly/nightly-rustc/rustc_mir/hair/cx/expr/index.html])
2929
and then process the [HAIR] expressions recursively.
@@ -85,7 +85,7 @@ basic block onto which the statements should be appended.
8585

8686
## Lowering expressions into the desired MIR
8787

88-
There are essentially four kinds of representations one might want of a value:
88+
There are essentially four kinds of representations one might want of an expression:
8989

9090
* `Place` refers to a (or a part of) preexisting memory ___location (local, static, promoted)
9191
* `Rvalue` is something that can be assigned to a `Place`

0 commit comments

Comments
 (0)