@@ -68,10 +68,12 @@ we'll talk about that later.
6868- We then take the AST and [ convert it to High-Level Intermediate
6969 Representation (HIR)] [ hir ] . This is a compiler-friendly representation of the
7070 AST. This involves a lot of desugaring of things like loops and ` async fn ` .
71- - We use the HIR to do [ type inference] . This is the process of automatic
72- detection of the type of an expression.
73- - ** TODO: Maybe some other things are done here? I think initial type checking
74- happens here? And trait solving?**
71+ - We use the HIR to do [ type inference] (the process of automatic
72+ detection of the type of an expression), [ trait solving] (the process
73+ of pairing up an impl with each reference to a trait) and [ type
74+ checking] (the process of converting the types found in the HIR
75+ (hir::Ty), which represent the syntactic things that the user wrote,
76+ into the internal representation used by the compiler (Ty<'tcx>)).
7577- The HIR is then [ lowered to Mid-Level Intermediate Representation (MIR)] [ mir ] .
7678 - Along the way, we construct the THIR, which is an even more desugared HIR.
7779 THIR is used for pattern and exhaustiveness checking. It is also more
@@ -111,6 +113,8 @@ we'll talk about that later.
111113[ parser ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_parse/index.html
112114[ hir ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_hir/index.html
113115[ type inference ] : https://rustc-dev-guide.rust-lang.org/type-inference.html
116+ [ trait solving ] : https://rustc-dev-guide.rust-lang.org/traits/resolution.html
117+ [ type checking ] : https://rustc-dev-guide.rust-lang.org/type-checking.html
114118[ mir ] : https://rustc-dev-guide.rust-lang.org/mir/index.html
115119[ borrow checking ] : https://rustc-dev-guide.rust-lang.org/borrow_check.html
116120[ mir-opt ] : https://rustc-dev-guide.rust-lang.org/mir/optimizations.html
0 commit comments