You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/appendix-glossary.md
+8-9Lines changed: 8 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,21 +1,20 @@
1
-
Glossary
2
-
--------
1
+
# Appendix C: Glossary
3
2
4
3
The compiler uses a number of...idiosyncratic abbreviations and things. This glossary attempts to list them and give you a few pointers for understanding them better.
5
4
6
5
Term | Meaning
7
6
------------------------|--------
8
7
AST | the abstract syntax tree produced by the syntax crate; reflects user syntax very closely.
9
-
binder | a "binder" is a place where a variable or type is declared; for example, the `<T>` is a binder for the generic type parameter `T` in `fn foo<T>(..)`, and \|`a`\|` ...` is a binder for the parameter `a`. See [the background chapter for more](./background.html#free-vs-bound)
10
-
bound variable | a "bound variable" is one that is declared within an expression/term. For example, the variable `a` is bound within the closure expession \|`a`\|` a * 2`. See [the background chapter for more](./background.html#free-vs-bound)
8
+
binder | a "binder" is a place where a variable or type is declared; for example, the `<T>` is a binder for the generic type parameter `T` in `fn foo<T>(..)`, and \|`a`\|` ...` is a binder for the parameter `a`. See [the background chapter for more](./appendix-background.html#free-vs-bound)
9
+
bound variable | a "bound variable" is one that is declared within an expression/term. For example, the variable `a` is bound within the closure expession \|`a`\|` a * 2`. See [the background chapter for more](./appendix-background.html#free-vs-bound)
11
10
codegen unit | when we produce LLVM IR, we group the Rust code into a number of codegen units. Each of these units is processed by LLVM independently from one another, enabling parallelism. They are also the unit of incremental re-use.
12
11
completeness | completeness is a technical term in type theory. Completeness means that every type-safe program also type-checks. Having both soundness and completeness is very hard, and usually soundness is more important. (see "soundness").
13
-
control-flow graph | a representation of the control-flow of a program; see [the background chapter for more](./background.html#cfg)
12
+
control-flow graph | a representation of the control-flow of a program; see [the background chapter for more](./appendix-background.html#cfg)
14
13
cx | we tend to use "cx" as an abbrevation for context. See also `tcx`, `infcx`, etc.
15
14
DAG | a directed acyclic graph is used during compilation to keep track of dependencies between queries. ([see more](incremental-compilation.html))
16
-
data-flow analysis | a static analysis that figures out what properties are true at each point in the control-flow of a program; see [the background chapter for more](./background.html#dataflow)
15
+
data-flow analysis | a static analysis that figures out what properties are true at each point in the control-flow of a program; see [the background chapter for more](./appendix-background.html#dataflow)
17
16
DefId | an index identifying a definition (see `librustc/hir/def_id.rs`). Uniquely identifies a `DefPath`.
18
-
free variable | a "free variable" is one that is not bound within an expression or term; see [the background chapter for more](./background.html#free-vs-bound)
17
+
free variable | a "free variable" is one that is not bound within an expression or term; see [the background chapter for more](./appendix-background.html#free-vs-bound)
19
18
'gcx | the lifetime of the global arena ([see more](ty.html))
20
19
generics | the set of generic type parameters defined on a type or item
21
20
HIR | the High-level IR, created by lowering and desugaring the AST ([see more](hir.html))
@@ -37,7 +36,7 @@ node-id or NodeId | an index identifying a particular node in the AST or
37
36
obligation | something that must be proven by the trait system ([see more](trait-resolution.html))
38
37
promoted constants | constants extracted from a function and lifted to static scope; see [this section](./mir.html#promoted) for more details.
39
38
provider | the function that executes a query ([see more](query.html))
40
-
quantified | in math or logic, existential and universal quantification are used to ask questions like "is there any type T for which is true?" or "is this true for all types T?"; see [the background chapter for more](./background.html#quantified)
39
+
quantified | in math or logic, existential and universal quantification are used to ask questions like "is there any type T for which is true?" or "is this true for all types T?"; see [the background chapter for more](./appendix-background.html#quantified)
41
40
query | perhaps some sub-computation during compilation ([see more](query.html))
42
41
region | another term for "lifetime" often used in the literature and in the borrow checker.
43
42
sess | the compiler session, which stores global data used throughout compilation
@@ -54,7 +53,7 @@ token | the smallest unit of parsing. Tokens are produced aft
54
53
trans | the code to translate MIR into LLVM IR.
55
54
trait reference | a trait and values for its type parameters ([see more](ty.html)).
56
55
ty | the internal representation of a type ([see more](ty.html)).
57
-
variance | variance determines how changes to a generic type/lifetime parameter affect subtyping; for example, if `T` is a subtype of `U`, then `Vec<T>` is a subtype `Vec<U>` because `Vec` is *covariant* in its generic parameter. See [the background chapter for more](./background.html#variance).
56
+
variance | variance determines how changes to a generic type/lifetime parameter affect subtyping; for example, if `T` is a subtype of `U`, then `Vec<T>` is a subtype `Vec<U>` because `Vec` is *covariant* in its generic parameter. See [the background chapter for more](./appendix-background.html#variance).
0 commit comments